开发者

Conflict with ajax while using with Jquery

开发者 https://www.devze.com 2023-01-19 15:56 出处:网络
hi i am using jquery tab in my page. but while using update pannel both tab will appear in same page. this occures after a post back.. is any problem is there for us开发者_JS百科ing jquery and update

hi i am using jquery tab in my page. but while using update pannel both tab will appear in same page. this occures after a post back.. is any problem is there for us开发者_JS百科ing jquery and update pannel together? How can i overcome this?


I'm using the jquery-ui tabs and <asp:updatePanel> controls on the same page, and it's not the best setup, but it works. One thing that really got me was that tabs() wasn't being called after a partial-postback call to DataBind() in one of the inner ASP.NET controls. I worked around it this way, and perhaps this will help you:

function refreshTabs() {
    $("#tabs").tabs();
}

function pageLoad () {
    refreshTabs();
}

By putting the call to tabs() inside ASP.NET's pageLoad() function instead of jquery's $() function, it's called after every postback, even if only a partial postback was triggered.

Hope this helps!

0

精彩评论

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

关注公众号