I just had to wrap document ready function around:
jQuery(document).ready(function( $ ) {
$('#imageholder img').on('mousemove', null, [jQuery('#horizontal'), jQuery('#vertical')],function(e){
e.data[1].css('left', e.offsetX==undefined?e.originalEvent.layerX:e.offsetX);
e.data[0].css('top', e.offsetY==undefined?e.originalEvent.layerY:e.offsetY);
});
$('#imageholder').on('mouseenter', null, [jQuery('#horizontal'), jQuery('#vertical')], function(e){
e.data[0].show();
e.data[1].show();
}).on('mouseleave', null, [jQuery('#horizontal'), jQuery('#vertical')], function(e){
e.data[0].hide();
e.data[1].hide();
});
});
Related Posts:
- Submit a form using jQuery
- Adding placeholder attribute using Jquery
- JavaScript: filter() for Objects
- Force a default browser on my android phone using a simple html shortcut page
- Is jQuery $.browser Deprecated?
- jQuery date formatting
- $ versus jQuery
- How to center image in carousel
- jQuery dynamic selector
- How to pass $(this) properly in click jQuery function
- How to remove specific value from array using jQuery
- The ‘describe’ keyword in javascript
- e.preventdefault(); not working
- How to empty input field with jQuery
- Using WordPress 3.5 Media Uploader in meta box?
- how to remove default jquery and add js in footer?
- Move WordPress native javascript to bottom of page?
- Lightbox popup on WooCommerce add_to_cart action
- Check if jquery library exist
- Loading style.css and Jquery using HTTPS
- AJAX function returning -1
- Access Customizer’s DOM – jQuery
- jQuery AJAX form validation
- Media manager multiple selection
- Trying to get single posts to load on the front page via ajax
- How to include jQuery properly?
- How to load whole WordPress pages dynamically with AJAX/jQuery like this following website?
- Creating custom AJAX requests
- How to pass jQuery ajax URL value
- trigger(‘change’) not working
- how to get the comment ID in the front end when the REPLY button is clicked?
- Gravity list field override and adding javascript [closed]
- Change header image loaded by jQuery to use HTTPS
- Admin wp_ajax hook returning 0
- Adding a character counter to the excerpt metabox
- Need To Deregister Scripts Via Functions.Php
- Add a Fancybox automatically to post type “post” images
- enqueued script with jquery dependency not getting jquery
- Uncaught TypeError: jQuery is not a function
- WordPress customizer refresh screen after save
- Creating multiple enclosing shortcodes and fixing JS issues on click
- How can I check email exists via a jquery keyup()?
- Include jQuery plugin in WordPress
- Hide metabox dependant on page template chosen
- Trying to remove duplicate jquery scripts
- How to make an WordPress element sticky? [closed]
- How to Dynamically Load Content Into Body of Bootstrap Modal Window?
- I want to import my Json file into a custom made display-modal. How do i link my Json file?
- Validating a cloned/repeatable input (jQuery) [closed]
- How do I remove WordPress Custom Menus hover event and replace it with jQuery onclick?
- How to get all users by custom current user meta (array)?
- wp_dequeue_script not working in my plugin
- Reload wordpress shortcodes
- Ajax form submit not working, returns 0
- Do I need to use jQuery for my template?
- Why not working jquery show() function in wordpress? [closed]
- Problem Implementing parallax in header of bp-default theme
- jQuery Show DIV and Remove Button [closed]
- timeouts (ERR_CONNECTION_RESET) on seemingly random files after upgrading to HTTPS
- jQuery don’t working
- Moving jQuery to footer from header
- jQuery plugin not loading
- Flexslider won’t work with WordPress’ jQuery | Dependencies
- My wordpress site is using local ip to point to jquery and other files, how to fix it?
- Search query with Ajax
- admin ajax php success returns 0
- Blur.js with WordPress – Enqueued, but server not finding file
- Load an action which is in an url with Jquery
- After inserting jquery weather code, my responsive menu is lost
- Tabbed content for WordPress sidebar
- Selecting multiple options onclick
- my example with ajax doesn’t work
- Best way to add some custom javascript using jquery to a child theme
- Retrive username of the loged in user using jquery
- How to setup multi-page using jquery?
- $ not defined using jQuery in WordPress
- Get with jQuery the value of an ACF field
- I want to run Sql Query in script how can i do this
- error: n.imagesLoaded is not a function
- WordPress forbidden 403 on delete in production vs local environment
- Homepage loads many unnecessary jquery-ui files
- How to change event in slider
- Get ajaxForm response value
- Update a parent theme JQuery property in the child theme
- Adding scripts before plugins scripts
- jQuery search function not running in WordPress but running locally (fiddle)
- Can’t seem to get JQuery working (wordpress plugin)
- Bootstrap with Flexslider jQuery Issue
- Console shows ReferenceError: jQuery is not defined, no clue why!
- slide change on hover with nextgen scrollgallery [closed]
- How to make jQuery load AFTER plugin’s script?
- jQuery not working internal pages [duplicate]
- jQuery .change() Event Bubbling in WP Admin
- Contact Form 7 submission does not complete [closed]
- Unable to understand this jquery code [closed]
- Combo box populating a DIV using ajax/jquery
- Accessing Advanced Custom Fields with Repeater using jQuery instead of PHP
- How to Add jQuery cod in wordpress [duplicate]
- can’t make jQuery work (change image on time interval) [closed]
- Contact Form 7 – Submit Form not working After Ajax Request [closed]