Skip to content
Advertisement

How to display a particular div in jquery?

I have written some code for displaying a particular div in html. The code is shown below :

JavaScript

I have written a code for displaying the div pdfdiv_1 in jquery as shown below :

JavaScript

When I am printing the console output, it is only printing the first section part but not the second section tag.

The output in console is :

JavaScript

Can anyone help me out in this ?

I cant print all the html code present inside the div pdfdiv_1.

The html code :

JavaScript

Advertisement

Answer

There are some mistakes on html tags placement.

This code might fix them :

JavaScript

Generally the IDE show these errors in red. Example with IntelliJ softwares : enter image description here

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement