php - jquery show divs by default -


this question has answer here:

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.

this previous question inadvertantly marked answered when wasnt. here jfiddle: http://jsfiddle.net/k3jrk/

you're there. if want forward pane enabled default, try this:

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

new fiddle: http://jsfiddle.net/nmbe6/


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 -