Some things like click events and lightbox's don't work since they are internal links. How can I make an exception for these things in regards to the ALL AJAX Wordpress theme?
***EDIT*** I have also just read your other post: 13068.
You've tried the '.not()' function. No further ideas from me then! :-)
I believe the issue @BoringCode is trying to address is already dealt with by the '.live' function. The only time that you would need to readdress 'click' functions is if there is an 'iframe' in the lightbox.
I now know what BoringCode was trying to say and I want to apologize for being a bit rude to him. When he said I needed to initialize the click in the AJAX call he really meant I needed to RE-initialize the click function so I misinterpreted what he was trying to say.
That being said, I thought I had been reinitializing it. I tried using .live() and .delegate() to re-establish the clicks as well and neither worked. For whatever reason I had to recall the entire function that sets up the gallery. I suppose there's important code that needs the DOM already set before calling it so just replacing the clicking wasn't enough.
noah- i'm running into a similar problem with using jquery with the allajax theme, thought you might be able to elaborate on your solution.
i've implemented a slideshow on individual pages and it works if i hit the url exactly (www.site.com/pagetitle), but the jquery bits arent happy with the ajax'd url (www.site.com/#/pagetitle).
can you provide a bit more detail into how you recalled the js function?
Sure, no problem. I added the links to the 'removed list' (like in clokey's example) and then I the changed all the initiallizing clicks in me plugin's code from:
$("a").click(function(e) {
to
$("a").live('click', function(e) {
and that fixed the issue. If you post your code or tell me what slider you're using I can give a more detailed answer on how to fix your code to work with AJAX
after pondering a bit more, the issue seems related but the cause might be different. i'm using the Image Slider plugin from TheThe Fly.
here's a screenshot of what's happening. the slideshow window div is created and appears, but the loading bar stays persistent. and, as you can see, the thumbnails are displaying correctly, though there's no click action.
if i remove the ajax functionality entirely, the slideshow works exactly as intended. so, it's definitely a related issue, but not quite the same.
here's the link to a test setup. currently, the only page that has the TheThe Fly Image Slider loaded into it is the "photographers" page. as you can see, if you hit http://awesomesnack.com/photographers/ directly, the slideshow works as expected. if you go the root url and click on the photographers link, you get the spins.
***EDIT*** I have also just read your other post: 13068.
You've tried the '.not()' function. No further ideas from me then! :-)
I believe the issue @BoringCode is trying to address is already dealt with by the '.live' function. The only time that you would need to readdress 'click' functions is if there is an 'iframe' in the lightbox.
I did however find out the problem.
I found this article by Chris: http://css-tricks.com/9738-just-one-of-those-things-you-need-to-understand-about-javascript/
I now know what BoringCode was trying to say and I want to apologize for being a bit rude to him. When he said I needed to initialize the click in the AJAX call he really meant I needed to RE-initialize the click function so I misinterpreted what he was trying to say.
That being said, I thought I had been reinitializing it. I tried using .live() and .delegate() to re-establish the clicks as well and neither worked. For whatever reason I had to recall the entire function that sets up the gallery. I suppose there's important code that needs the DOM already set before calling it so just replacing the clicking wasn't enough.
Thanks for the help BoringCode and clokey2k.
Sorry again BoringCode
i'm running into a similar problem with using jquery with the allajax theme, thought you might be able to elaborate on your solution.
i've implemented a slideshow on individual pages and it works if i hit the url exactly (www.site.com/pagetitle), but the jquery bits arent happy with the ajax'd url (www.site.com/#/pagetitle).
can you provide a bit more detail into how you recalled the js function?
thanks!
jon
to
and that fixed the issue. If you post your code or tell me what slider you're using I can give a more detailed answer on how to fix your code to work with AJAX
here's a screenshot of what's happening. the slideshow window div is created and appears, but the loading bar stays persistent. and, as you can see, the thumbnails are displaying correctly, though there's no click action.
if i remove the ajax functionality entirely, the slideshow works exactly as intended. so, it's definitely a related issue, but not quite the same.
jon
Can you post a link?