$(function(){ $('div.dropdown').mouseover(function() { $(this).addClass('open'); }).mouseout(function() { $(this).removeClass('open'); }); $("#myCarousel").carousel('cycle'); $("#myCarousel1").carousel('cycle'); })