Fading visibility of element using jQuery

前端 未结 5 1674
广开言路
广开言路 2020-12-13 09:02

I\'m having some trouble with finding the visibility param for JQuery.

Basically... the code below does nothing.

$(\'ul.load_details\').animate({
            


        
5条回答
  •  南笙
    南笙 (楼主)
    2020-12-13 09:09

    Maybe you are just looking to show or hide an element:

    $('ul.load_details').show();
    $('ul.load_details').hide();
    

    Or do you want to show/hide element using animation (this doesn't make sense of course as it will not fade):

    $('ul.load_details').animate({opacity:"show"});
    $('ul.load_details').animate({opacity:"hide"});
    

    Or do you want to really fade-in the element like this:

    $('ul.load_details').animate({opacity:1});
    $('ul.load_details').animate({opacity:0});
    

    Maybe a nice tutorial will help you get up to speed with jQuery:

    http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/

提交回复
热议问题