Jquery being loaded wrong
since it runs on old jquery ,try adding the old jquery on your footer of your theme, add the jquery manually and add script noconflict. You can get jquery library list from google cdn View Sample
since it runs on old jquery ,try adding the old jquery on your footer of your theme, add the jquery manually and add script noconflict. You can get jquery library list from google cdn View Sample
Oh okay.. I think I solved it. I put the script in the header.php (I think “into the loop” as they say?) just behind the opening <header>-tag: <body> <header> <script type=”text/javascript”> (function($) { $(document).ready(function(){ $(window).scroll(function(){ if ($(this).scrollTop() > 200) { $(‘#menu’).fadeIn(500); } else { $(‘#menu’).fadeOut(500); } }); }); })(jQuery); </script>
There are a few problems but the main one is when sidebarEffects.js is loaded the HTML it’s looking for doesn’t exist yet. So… var container = document.getElementById( ‘st-container’ ) // and buttons = Array.prototype.slice.call( document.querySelectorAll( ‘#st-trigger-effects > button’ ) ) are both empty when the script is run. Easiest way to fix it is to … Read more
its working now:- jQuery(function() { var $button = jQuery(‘#loginButton’); var $box = jQuery(‘#site-crhead’); var $form = jQuery(‘#loginForm’); $button.live(‘click’,function(login) { console.log($box); $box.toggle(); $button.toggleClass(‘active’); }); $form.live(‘click’,function() { return false; }); jQuery(this).live(‘click’,function(login) { if(!(jQuery(login.target).parent(‘#loginButton’).length > 0)) { $button.removeClass(‘active’); $box.hide(); } }); }); Just update your code according to you, even your mouseup function was not working, according to … Read more
It’s jQuery not JQuery. Try jQuery(‘div’).raty({ score: 3 });
May i suggest: $(‘tr td .widget-remove a’).click(function(){ var toremove = $(this).attr(‘rel’); // Out of ideas – you shouldn’t really be for we are here! $.ajax({ type: ‘POST’, // use the method you want dataType: ‘json’, url: ajaxurl, // this is the url to the admin ajax script data: { nonce : your_script_data_object.nonce, toremove: toremove }, … Read more
You’ve left something out of the description– namely, it isn’t clear how/where you load that code. I am guessing you are pushing things through a template file somehow, or through a backend plugin file maybe, as you have what looks like template code showing up. You should instead, in my opinion, be using the AJAX … Read more
sThis doesn’t need jquery, just add a custom header for your pages and change the menu links in this header accordingly: Copy the same header.php file and rename it to header-pages.php and edit its menu links to the following: <ul> <li data-menuanchor=”home”> <a href=”https://wordpress.stackexchange.com/”>home</a> </li> <li data-menuanchor=”about”> <a href=”/#about”>about us</a> </li> … </ul> In your … Read more
Substitute $search = like_escape($_REQUEST[‘q’]); with $search = $wpdb->esc_like( $_REQUEST[‘q’] ); (Note assuming $_REQUEST has standard WP magic_quotes_gpc escaping.) For reference, here’s the exact code I put in “functions.php”: add_action(‘wp_enqueue_scripts’, ‘se_wp_enqueue_scripts’); function se_wp_enqueue_scripts() { wp_enqueue_script(‘suggest’); } add_action(‘wp_footer’, ‘se_wp_head’); function se_wp_head() { ?> Search: <input id=”se_search_element_id” type=”text”> <script type=”text/javascript”> var se_ajax_url=”<?php echo admin_url(“admin-ajax.php’); ?>’; jQuery(document).ready(function() { jQuery(‘#se_search_element_id’).suggest(se_ajax_url … Read more
Custom button on admin page doesn’t trigger click event