im trying to hide all the selected element on document ready, but only the element in the first li is hide, all other li requires to run my hover script before its hide
here is the rough structure
<#container>
<.block_content>
<ul>
<li><.selected_content></>
<li><.selected_content></>
<li><.selected_content></>
Using the document.ready function {$(‘.block_content > ul > li.selected’).hide(); $(‘container’).hover(function)…..}
only the .selected in the first li is hidden, the other requires to hover above to trigger the second function to hide
all of these li is under the same class, so anyone have any idea to hide them all at the start?
Your HTML markup is unclear but you can hide all lis having
selectedclass like this: