Open image gallery on link click

As I understand it, you want to show a div element containing the gallery when Show Gallery is pressed – otherwise to hidden. This can be accomplised with a couple of jQuery lines: $( “.show” ).click(function() { $( “.gallery” ).addClass( “display” ); }); With the appropriate CSS. See jsfiddle Be sure to remember to include … Read more

How to use value from modal tinymce windowManager?

If I read your question correctly, this is more related to Javascript programming than WordPress. To get the selected option value or text of a HTML select tag, use: var e = document.getElementById(“programming-language-id”); var value = e.options[e.selectedIndex].value; //your code doesn’t set option value var text = e.options[e.selectedIndex].text; //this will get the selected option text

adding script tag in head of specific pages

A simple google search can help you do this, well same question was answered before, you can see the answer here. Use WordPress methods in your functions.php to do this : function load_scripts() { global $post; wp_register_script( ‘home’, get_template_directory_uri() . ‘/js/home.js’, array(‘jquery’)); wp_register_script( ‘about’, get_template_directory_uri() . ‘/js/about.js’, array(‘jquery’)); wp_register_script( ‘somepost’, get_template_directory_uri() . ‘/js/somepost.js’, array(‘jquery’)); if( … Read more

Adding javascript script to header via functions.php

I just opened your website and checked your crypto.js is successfully embeded in your head. But you have some errors in your code that’s is why it’s not working. Here is the code which i have found in your file. jQuery(document).ready(function() { <script type=”text/javascript”> baseUrl = “https://widgets.cryptocompare.com/”; var scripts = document.getElementsByTagName(“script”); var embedder = scripts[ … Read more

How to correctly load this jquery script through the file functions.php?

You don’t need to include jquery-ui and jquery-ui.min either of them is sufficient . Also jquery and jquery-ui are already included in WordPress. Try this wp_enqueue_script( ‘jquery’); wp_enqueue_script( ‘jquery-ui-core’); wp_enqueue_script( ‘qs.slider’, get_template_directory_uri() . ‘/layout/assets/js/qs.slider.js’, array(‘jquery’,’jquery-ui-core’), ”, true ); wp_enqueue_script( ‘qs.slider.init’, get_template_directory_uri() . ‘/layout/assets/js/qs.slider.init.js’, array(‘jquery’,’jquery-ui-core’), ”, true ); The above code will make sure jquery and … Read more