Support » Themes and Templates » Trying to launch a slider -Where is code for inline loading of posts

  • Resolved helgatheviking


    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

    $.historyLoad(hash, page);

    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.


Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi


    Forum Moderator

    thanks for the reply, but that’s just a primer on how to use javascript with WP. i’m way beyond that and not struggling with how to implement scripts, but rather have a very specific jquery question. i know it is a jquery question, but since i’m looking for a specific functionality within a WP theme, i thought i’d post here.



    Forum Moderator

    no offense, but did you read my post? i’m looking for the code within the grid-a-licious theme that is responsible for the ajax/inline loading of posts on the home page?

    I know this thread hasn’t been touched in two months, but did you ever resolve the issue? I recently ran into the same problem, myself.

    forgot i even posted this.

    yes i did resolve it. for starters i added the slider script initialization in w/ the other scripts at the bottom of single-gal.php after that i don’t recall everything that i did as there was a lot to do w/ the grid layout and the theme’s js was cryptic at best.

    thank you

    Thank you so much for the response, but I’m still having a terrible time with this. Did you only work with the init.js, or did you also modify the grid-a-licious.js as well?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Trying to launch a slider -Where is code for inline loading of posts’ is closed to new replies.