开发者

highlight div on page load?

开发者 https://www.devze.com 2023-03-21 02:48 出处:网络
I want to highlight a div on page load. i could find a solution. But the issue is that it fades out entire content of the div. what i used

I want to highlight a div on page load. i could find a solution. But the issue is that it fades out entire content of the div. what i used

$('#searchdiv .highligth').fadeOut(1000);

and the html i have written

                   <div id="searchdiv">
                    <div class="highligth">
                        <table cellspacing="2">
                            <tr>
                           开发者_如何转开发     <td>
                                    <a class="anchorText">Filter By:</a>
                                </td>
                                <td>
                                    <asp:ObjectDataSource ID="objLanguage" runat="server" OldValuesParameterFormatString="original_{0}"
                                        SelectMethod="GetLanguage" TypeName="Lang.Repositories.LanguageRepository">
                                    </asp:ObjectDataSource>
                                    <asp:DropDownList ID="dlFilter" runat="server" DataSourceID="objLanguage" DataTextField="LanguageType"
                                        DataValueField="LanguageId" Width="150px" AppendDataBoundItems="True" OnDataBinding="dlFilter_DataBinding"
                                        OnDataBound="dlFilter_DataBound">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:Button ID="btnFilter" runat="server" Width="90px" Text="Filter" OnClick="btnFilter_Click" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>

for few seconds the div is highlighted and as fadeout is mentioned so the content also fade out and the div becomes empty. How to let those control be visible??

Thanks.


Use fadeOut and fadeIn method,

 $('#searchdiv .highligth').fadeOut(1000).fadeIn(2000);

View Demo: http://jsfiddle.net/rgVTW/


Is this what you're looking to do?

 $('.highligth').effect("highlight", {}, 3000);


Try this

$('#searchdiv .highligth').css({opacity: 0}).animate({opacity: 0.5 }, 1000);


Actually there is a very easy and new way to do this.

just add #:~:text=Highlight%20These

try accessing this link

https://stackoverflow.com/questions/38588721#:~:text=Highlight%20a%20text

0

精彩评论

暂无评论...
验证码 换一张
取 消