trouble loading via ajax

Home Forums WordPress Slider Plugin trouble loading via ajax

This topic contains 3 replies, has 2 voices, and was last updated by  Muneeb 1 year, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2028

    Jennifer

    Hi,

    First I want to thank you for a really nice plugin.

    For my website, I am using a few different sliders and loading them into the home page via ajax. My slides work just fine on their individual pages, but when I load them in via ajax, they don’t appear. The html is there, but they are set to display:none and the jquery is not working. It seems the html loads, but the scripts do not.

    Can you point me in the right direction to fix this?

    Thank you.

    #2031

    Muneeb
    Member

    It’s clear that script code or JS code is not being executed, I hope the following links helps you in resolving the issues you are having please check them.

    http://stackoverflow.com/questions/2203762/when-loading-an-html-page-via-ajax-will-script-tags-be-loaded

    http://stackoverflow.com/questions/889967/jquery-load-call-doesnt-execute-javascript-in-loaded-html-file

    #2059

    Jennifer

    Thanks for the suggestions. Unfortunately, neither provided the solution for me.

    However, I did finally find the problem and thought I’d post it here in case anyone needs it in the future. In the file, simple-slider-ssp/views/ssp_skins/default/slider.php, I deleted line 63:

    $(window).load( function() {

    Since the javascript was wrapped in this function, it was only executing when the window loaded. Removing this line allowed it to execute even when loaded via ajax.

    #2079

    Muneeb
    Member

    Thanks Jennifer for finding out the issue I hope in future it’ll help anyone who encounter this issue again.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘trouble loading via ajax’ is closed to new replies.