function - Jquery - Selecting div after style change -
i have select box triggers onchange event (not code, plugin's code). select box hide/show next box according item selected. way plugin hides or shows next box changing style of element.
for instance:
if select option 1. plugin triggers onchange event , changes next box's style from
display:none
to
display:list-item
once item style changes, need select item , other stuff own code. problem onchange triggering before plugin's code, can't find item select.
my code:
("#input").change(function(){ var mymatch = $("li[style='display: list-item;']");});
if reselect again option 1, work, because plugins function has executed once.
i tried adding settimeout function, did not work. guess function needs either listen style changes, or somehow execute after plugin function... ideas? approaching wrong?
you can try going more concise selector instead of style attribute, if you're looking visible list items can use
$('li:visible')
Comments
Post a Comment