I am using jQuery Ui Tabs, and I am loading in external content. How do I enable the LIVE() capabilities of the tab?
Like I do with other links etc.
$("#button").live('click', function(){});
Is this possible with UI Tabs?
I just found this code, but i'm getting really biza开发者_JAVA技巧rre behavior... seems to be much glitchier.
$('#example').tabs({
load: function(event, ui) {
$('a', ui.panel).live("click", function() {
$(ui.panel).load(this.href);
return false;
});
}
});
I don't think that that is possible. Probably JQueryUI Tabs plugin is overwriting internally click event.
I only can do this: http://jsbin.com/egoca5
$('#tabs').tabs();
$('#tabs ul li a').bind('click', function(){
alert('hello');
});
All visible HTML elements can have a click
event bound to them using jQuery. Any event you can bind
to (e.g., click
) you can also set live
on, as such, as long as #button
is a visible HTML element in the page then the live
method should work just fine.
I think not.
Solution is to perform an action that declare tabs just after loading the external content.
精彩评论