Issues with jQuery UI tabs, AJAX and Ajaxpager
I have searched through a lot of the similar questions on here, and tried many things but I am still stuck. Not that I am relatively new to jQuery.
What I want to do is use jQuery UI tabs (with jQuery address - for back button and bookmarking). I have this working no problem.
Inside each tab, I am trying to use an jQuery UI ajaxpager. I am having a problem getting the pager to initiate inside the ajax loaded content. Correction: used ajaxComplete
the get the pager initialized on the second tab..
Now my problem is this.
- load page. OK
- click tab 2. OK
- click tab 1. OK
now that I'm back on tab 1, tab 2 will not work.
I am sure it is something simple. You can view my demo here: http://www.sjlarchitect.com/help/projects_en1.html
I have been struggling for a couple days now trying to get this implemented. I am sure i开发者_StackOverflowt is something very simple. If it's not ok to post a link to my example please advise me.
Note: pager is not styled, etc. etc. just trying to get the implementation to work.
I was having a similar problem with the UI dialog box. I had to add an onLoadComplete logic and then onUnload logic to destroy the data. I believe this is because when you switch tabs its actually re-init-ing the jquery constructors, so when you switch, you will need to de initialize the information you have in there, in this case, jquery ui ajaxpager.
I will take a look and see if I can come up with a more definite answer, but that is my best guess without diving into the code.
精彩评论