JS global variable doesn’t update

If you want to create global variable intentionally you need to do this. window[‘your_variable_name’]= ‘Some variable value’; then you’ll be able to access it like window.your_variable_name – this way of creating and accessing global variable guarantees that you will work with same variable regardless of what build tools like webpack or from where you access … Read more

main navigation menu disappear after adding jquery source file

jQuery is already being included on the page, so you don’t need to include it again. I’m assuming your adding that because you want to run the JS below it? $(document).ready(function() { $(“#countryChooser”).change(function() { if ($(this).val() !== “”) { var selector = “.” + $(this).val(); $(‘.box’).not(selector).hide(); $(selector).show(); } else { $(“.box”).hide(); } }).change(); }); If … Read more

JQuery is not working after complete load of the page

Hard to say what the problem is without seeing the html structure. Any error in your browser console log ? Might that another jQuery function is already bind to the “.apmstoriespic” class. Maybe try the below instead jQuery(“.apmstoriespic”).on(‘hover’,function(){ If you want to skip the jQuery route altogether, there is an easy way to achieve the … Read more

How to enable read more by default using jquery

You can use the solution bellow with jQuery: jQuery(document).ready(function(){ jQuery(“.post-read-more”).each(function(){ jQuery(this).click(); }); // And if you want to finally disable this links jQuery(“.question-read-more”).remove(); jQuery(“.question-read-less”).remove(); }); Bests, Camille

Slick slider for post doesn’t display anything

look at this example structure : /** * Section Servises */ $servises_info = new WP_query(‘pagename=правни-услуги’); if ($servises_info -> have_posts() ) : while ( $servises_info -> have_posts() ) : $servises_info -> the_post(); // look hire below $relayted_post = new WP_query(‘cat=2&order=ASC’); /* Start the Loop two */ while($relayted_post -> have_posts()): $relayted_post -> the_post(); $servises_data = get_the_content(); // … Read more