javascript - toggle/visible check wrong behavior or a bug in the library -


i have section on call toggle() callback format. have noticed if visible check on child element of toggled section, opposite. instead of visible false.

i have following code fragments:

$('.section_advanced').toggle('fast',resizesection());   function resizesection() {     console.log($('#responsibilitylevel').is(':visible'));     if ($('#responsibilitylevel').is(':visible')) {      } else {             } } 

where responsibilitylevel child of of .section_advanced section.

you need pass resizesection function instead of calling it.

this:

$('.section_advanced').toggle('fast',resizesection()); 

should be:

$('.section_advanced').toggle('fast',resizesection); 

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 -