Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
84
rated 0 times [  88] [ 4]  / answers: 1 / hits: 12902  / 10 Years ago, fri, may 30, 2014, 12:00:00

I already tried other examples that I found from Google and SO but can get any to execute so I was trying this silly solution for opening the Bootstrap accordion on hover but it doesn't want to work either... any suggestions?



HTML



<nav class=nav>
<ul>
<li><a class=accordion-toggle data-toggle=collapse data-trigger=hover data-parent=#submenu href=#one>SHOW</a></li>
</ul>
</nav>


<div id=one class=collapse>
<div class=accordion-inner>
HERE IS THE STUFF
</div>
</div>




jQuery



$('#submenu').collapse({ trigger: hover })



FIDDLE


http://jsfiddle.net/5J852/


More From » jquery

 Answers
0

You can also try this


$(document).ready(function(){
$( ".accordion-toggle" ).mouseover(function(){
$( ".accordion-toggle" ).trigger( "click" );
// If creating multiple accordion items, use the below to prevent all other
// items with the class "accordion-toggle" triggering a click event
// $(this).trigger("click");
});
});

check this fiddle


[#44930] Thursday, May 29, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
alonso

Total Points: 747
Total Questions: 108
Total Answers: 105

Location: Mauritania
Member since Sun, Sep 25, 2022
2 Years ago
;