Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Prevent an exception with jQuery UI Tabs
- $("#tabs").tabs("add","#tabContent0","CLICK ME TO CHANGE PAGE",0);
- $('a[href="#tabContent0"]').attr("href","javascript:window.location='http://www.google.co.uk';");
- $('#tabs').bind('tabsselect', function(event, ui) {
- if(ui.index<2) //ignore this will change to get current tab count -1 (so the end tab is left as it is
- {
- window.location=$('#'+ui.tab).attr("href"); //attr href is undefined, how do i use ui.tab properly to get the right url
- return false;
- }
- });
- $("#tabs").tabs("add","#tabContent0","CLICK ME TO CHANGE PAGE",0);
- $('a[href="#tabContent0"]').click(function() {
- document.location='http://www.google.co.uk/';
- });
- $('#example').tabs({
- select: function(event, ui) {
- var url = $.data(ui.tab, 'load.tabs');
- if( url ) {
- location.href = url;
- return false;
- }
- return true;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment