Click here to Skip to main content
16,004,820 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
1
JavaScript
<script  type="text/javascript" >
$(document).ready(function(){

$(".edit_tr").click(function()
	{
	
		var id= $(this).attr("id");
		
		//("#sname_"+id).hide();
		//("#last_"+ID).hide('slow');
		alert("dd");
		alert("#sname_"+id);
		$("#name_"+id+'"').show('slow');
		//$("#q_"+ID).show();
		//$("#p_"+ID).show();
         });
});
this code give output "dd" & name of id like "#name_102" in alert box]
2
JavaScript
<script  type="text/javascript" >
$(document).ready(function(){

$(".edit_tr").click(function()
	{
	
		var id= $(this).attr("id");
		
		("#sname_"+id).hide();
		("#last_"+ID).hide('slow');
		alert("dd");
		alert("#sname_"+id);
		$("#name_"+id+'"').show('slow');
		//$("#q_"+ID).show();
		//$("#p_"+ID).show();
         });
});

if i do that then output is nothing why?????

what problem with code2 pls tell me
Posted
Updated 20-Jul-12 1:23am
v2
Comments
Sandeep Mewara 20-Jul-12 7:29am    
You mean an empty alert or nothing at all (not even alert?)

1 solution

JavaScript
$("#last_"+ID).hide('slow');

Here, what is ID? use id instead.
JavaScript
("#sname_"+id).hide();
("#last_"+ID).hide('slow');

Use JQuery or $ as follows:
JavaScript
$("#sname_"+id).hide();
$("#last_"+ID).hide('slow');
 
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