Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi it is my code


JavaScript
articleShowcase: function () {
    //jQuery('.article-showcase article').on('click', function () {
    //    jQuery('.article-showcase article.active').removeClass('active');
    //    jQuery(this).addClass('active');
    //    var link = jQuery(this).attr('rel');
    //    jQuery('.article-showcase .big-article.active').removeClass('active').fadeOut('slow', function () {
    //        jQuery('.article-showcase .big-article[rel="' + link + '"]').fadeIn('slow');
    //        jQuery('.article-showcase .big-article[rel="' + link + '"]').addClass('active');
    //    });
    //});
    jQuery('.article-showcase article').onmouseover( function () {
        jQuery('.article-showcase article.active').removeClass('active');
        jQuery(this).addClass('active');
        var link = jQuery(this).attr('rel');
        jQuery('.article-showcase .big-article.active').removeClass('active').fadeOut('slow', function () {
            jQuery('.article-showcase .big-article[rel="' + link + '"]').fadeIn('slow');
            jQuery('.article-showcase .big-article[rel="' + link + '"]').addClass('active');
        });
    });

},


the commented code worked nice
but i will changed jQuery('.article-showcase article').on('click', function ()...
to mouse hover

un commented code dont work!!!!

please help me
Posted
Comments
[no name] 17-Jul-14 7:25am    
http://api.jquery.com/mouseover/

1 solution

JavaScript
jQuery('.article-showcase article').on('mousehover', function () {
         jQuery('.article-showcase article.active').removeClass('active');
         jQuery(this).addClass('active');
         var link = jQuery(this).attr('rel');
         jQuery('.article-showcase .big-article.active').removeClass('active').fadeOut('slow', function () {
             jQuery('.article-showcase .big-article[rel="' + link + '"]').fadeIn('slow');
             jQuery('.article-showcase .big-article[rel="' + link + '"]').addClass('active');
         });
     });

 },
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900