If there is more than 1 attachment I’m trying to insert the attached images into a slider/carousel. i have almost everything up and running except that when i’m on my homepage and i click on a thumbnail, the post content is loaded via ajax… so the jquery doesn’t work on elements that weren’t in the DOM originally.
however, the only .ajax call i see is in the pageload() function in init.js. (well there are a few others in plugins.js but once unpacked it looks like that call is in reference to some kind of form validation) with .ajax i can successfully add nivo slider’s initialization code to the ajax function’s success callback which works fine when i load a page directly like so:
however, my modifications don’t get called if i am directly on the index page and then click on the thumbnail for the test-post. i presume the pageload() function doesn’t get called in this case.
the click function for the index thumbnails references a
function, in the jquery history section of plugins.js but that is packed and totally obfuscated and doesn’t the history plugin usually just work so that you can use your browsers back/forward buttons instead of actually loading content?
additionally, i’ve tried putting the initialization code in a <script> tag but found out that .post and .ajax always strip script tags when delivering content. so i have to find a way to latch on to the actual ajax call, but i can’t find it.
anyway, if anyone can point me to WHERE i can find the code that loads the posts on the homepage once thumbnails are clicked I should be able to sort it out. i can post back w/ the final ‘how to’ for adding a slider.
should i try to use the livequery plugin? though, i’d prefer not to load more scripts if it can be avoided.
- The topic ‘Trying to launch a slider -Where is code for inline loading of posts’ is closed to new replies.