jquery toggle text -


function toggle(div) {  $("#"+div).toggle(); $("#l_detail").html('hide');  }  <a href=""><label id="l_label>details</label></a> 

how change text details in toglee function

you can this:

function toggle(div) {    $("#"+div).toggle();   var txt = $("#"+div).is(':visible') ? 'hide' : 'details';   $("#l_detail").text(txt); } 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -