JavaScripts not working

This topic contains 2 replies, has 2 voices, and was last updated by  CTHthemes 4 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #3454



    Hi there 🙂

    I’ve installed the WordPress theme Domik however I need to add extra functionality. Therefore I am developing my custom plugin and I experience a problem:

    My JavaScript file is not loading when I navigate over the pages. I think the AJAX is causing the problem because every first time I hit the page, the JavaScript loads but when I navigate to some other page, it doesn’t load again. Also, a manual refresh solves the problem.

    I am including my JS files the WordPress way – using wp_register_script & wp_enqueue_script functions if that can be helpful for you.

    I really hope you will find solution for this problem because it is very important for me this to be working. Thank you in advance.




    OK if I use jQuery and its powerful selectors this is not a problem anymore so that’s what I did as solution.

    However, the AJAX is causing me the same problem now but for the WPML language switcher. When I navigate over pages and decide to switch the language, it will not redirect me to the current page but to the page that latest was loaded without AJAX. Any solutions for this one? Of course without touching the WPML core files.

    Kinda sad that you didn’t even reply to my first question for two days… 🙁



    You can disable the ajax page transition by disable (or delete) this block of code:

    jQuery(function() {
            ctbTrigger: "a.ajax",
            reloadbox: "#wrapper",
    		loadErrorMessage: "<h2>404</h2> <br> page not found.", // 404 error text 
            loadErrorBacklinkText: "Back to the last page", // 404 back button  text 
            outDuration: 250,
            inDuration: 150
            ksctbCallback: function() {

    from \Root/wp-content/themes/domik/js/scripts.js file. Thanks.

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

You must be logged in to reply to this topic.

New featues: CityBook - Listing & Directory WordPress Theme version 2.1.8 was outUpdate now