Click here to Skip to main content
15,905,504 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to display div below the active link for that i have taken
links


  • one
  • two



Inforamtion



$("#lione").on('click',function(){
	
	$("#lione").insertAfter($"div").show();
  
});


What I have tried:

<pre>$("#lione").on('click',function(){
	
	$("#lione").insertAfter($"div").show();
  
});


not displaying div after link
Posted
Updated 20-May-17 23:24pm
v2

1 solution

You have a syntax error ...
$("#lione").insertAfter($"div").show(); // your line
                        
$("#lione").insertAfter("div").show(); // no $ here!!!

You also use wrongly insertAfter[^], you probably should use after[^]...
(and you HAVE to use proper HTML)
$("#lione").insertAfter($"div").show();

$("#lione").after("<div />").show();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900