html - jquery hiding divs based on query results -


i have page in query run see if caller has forwarding enabled. result page form user can use make changes call forwarding if chooses. results query either yes or no, , if yes, forwarded number. using jquery hide cfadesc div if selects "disabled" radio button, works great.

 $(document).ready(function() {  $("div.cfadesc").hide(); $("input[name$='cfa']").click(function() {     var test = $(this).val();     $("div.cfadesc").hide();     $("#" + test).slidedown('slow'); }); }); 

my problem initial query. if has enabled, need show cfadesc div. above query, no matter result is, hidden. not sure how change hide/show attribute based on query run before code.

you can trigger click.

$(document).ready(function() {     $("input[name$='cfa']").click(function() {         var test = $(this).val();         $("div.cfadesc").hide();         $("#" + test).slidedown('slow');     }).click(); // line trigger click event }); 

i'm not sure if need, question not clear me. solution slidedown panel if defined in "cfa" input.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -