WordPress.org

Ready to get started?Download WordPress

Forums

Ajaxify WordPress Site(AWS)
[resolved] Reloading JS (3 posts)

  1. DanceYrselfClean_Admin
    Member
    Posted 1 year ago #

    I'm attempting to reload js files after the ajax and i've tried to follow the tutorial at http://www.youngtechleads.com/my-js-events-are-not-calling-after-loading-the-page-using-ajax/ but I just can't seem to figure it out.

    I'm using custom JS for my audio player button. It's just placed within a custom code section in my theme. Here's my JS I need to reload.

    <script type = "text/javascript">
    jQuery(document).ready(function() {
    jQuery(".fap-single-track").click(function() {
    jQuery(this).toggleClass('playing');
    jQuery.fullwidthAudioPlayer.toggle();
    });
    });
    </script>

    Is there any way I can edit this code to work with ajax or reload it afterwards?

    http://wordpress.org/extend/plugins/ajaxify-wordpress-site/

  2. manishkrag
    Member
    Plugin Author

    Posted 1 year ago #

    Sure put your above code in a separate file and then reload the file as mentioned in http://www.youngtechleads.com/my-js-events-are-not-calling-after-loading-the-page-using-ajax/

    Thanks

  3. DanceYrselfClean_Admin
    Member
    Posted 1 year ago #

    Thanks, I had tried this way before but I also couldn’t get it to work. It turns out after copying the code over into WordPad it changed some of the characters breaking the code. After figuring this out I got it to work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic