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 your jquery version, us live function before event.
Related Posts:
- How to prevent wordpress from loading old versions of jquery in wp_head();?
- How to get a jQuery script to run on a page?
- Including javascript for a shortcode
- How to properly add Bootstrap and JQuery Javascripts?
- How to add unique image class to WordPress
- Disable Cloudflare Rocket Loader for jQuery javascript and make it load first
- How to deregister scripts all at once
- How to set time delay in javascript
- Adding an onclick function to go to url in JavaScript?
- Checking a Url in Jquery/Javascript
- JavaScript: filter() for Objects
- JavaScript runtime error: ‘$’ is undefined
- When and why to ‘return false’ in JavaScript?
- JavaScript Loading Screen while page loads
- How is JavaScript .on() method defined?
- JQuery: $.get is not a function
- How to get client’s IP address using JavaScript?
- Simple throttle in JavaScript
- Enable & Disable a Div and its elements in Javascript
- How can I expand and collapse a using javascript?
- Javascript : array.length returns undefined
- The ‘describe’ keyword in javascript
- Correct Method to run scripts with dependencies without enqueue?
- Can’t get a JSON object in response to an Ajax request with wp_ajax
- Add tinymce buttons to caption textarea in media uploader
- Move WordPress native javascript to bottom of page?
- RequireJS in custom theme. Working Example
- How to handle multiple instance of “send_to_editor” js function
- Modify Custom Field in Media Library using JavaScript
- Trying to get single posts to load on the front page via ajax
- Ajax not firing properly using Firefox, but works in Chrome
- wp_enqueuescript won’t load in footer even with true value set?
- Execution of JavaScript on save post
- Prevent five different copies of jquery from being included on every page
- Is placing stuff in page text edit window bad form?
- javascript is not working on Event Submission?
- Add colorpicker to featured image
- Gravity Forms not loading under https, jQuery is not defined
- WordPress audio player causing js error, mediaelementplayer is not a function
- Add a Fancybox automatically to post type “post” images
- Auto-detect javascript errors and warn theme user
- combining js scripts from a js newb [closed]
- Enqueuing javascript files
- WordPress customizer refresh screen after save
- Creating multiple enclosing shortcodes and fixing JS issues on click
- Heartbeat API: How to access data already enqueued?
- Can’t load a class into WordPress post editor’s content field
- Implementing lazy loading in homepage posts instead of pagination
- Correct way to write jQuery functions in WordPress
- 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?
- Using bootstrap-slider and bootstrap-switch in wordpress admin panel
- Searching multiple tags and adding jQuery dependant script onto page template?
- TinyMCE 4 remove/add attributes for all images
- Trouble with WordPress Ajax Login System – 302
- How does WordPress handle HTML Tables interaction with jQuery
- Javascript stopped working [closed]
- Why load JS through the CMS framework? [duplicate]
- Problem passing id-specific objects to javascript via wp_localize_script
- url – ajax loaded but no JS
- Callback After WordPress Customizer Complete Loading
- Close Fancybox, sumbit form data and redirect
- Loading scripts on a single page plants the script in the footer
- Properly embed javascript into WP (using function.php) – doesn’t work?
- Nested Gallery Shortcode INTERMITTENTLY working
- How to keep HTML form field that is conditional hidden with javasript hidden after page reload?
- Accessing javascript in multiple files [closed]
- Issues loading Jquery on WordPress website
- Script not loading when depending on jQuery
- Required radio button does not validate in form, when clicked through Javascript/jQuery
- Redirect wp_dropdown_pages() to an AJax request?
- WP_ENQUEUE not working with Foundation 5
- Blur.js with WordPress – Enqueued, but server not finding file
- Is it OK combined wp-include js, jquery, css? [closed]
- Including Older Version of jQuery for IE7/IE8
- Parse wordpress blog data using json api and ajax
- Problem adding MP3 attachments to a jPlayer playlist
- Jquery not working
- A carousel slideshow plugin in JavaScript
- Best way to add some custom javascript using jquery to a child theme
- JS behavior differs depending on page tree [closed]
- Add JQuery As Code Snippet
- Theme customisation – how to store javascript externally when it utilises php variables?
- jQuery for Fade Preload Causes My Site Favicon to Disappear from Tab of Browser
- Get ajaxForm response value
- onclick jquery function not working in wordpress header file [duplicate]
- JQuery toggle in Visual Composer
- show-hide based on select option jquery wordpress
- Adding scripts before plugins scripts
- WP Media Uploader modal conflicts with Bootstrap modal
- jQuery search function not running in WordPress but running locally (fiddle)
- Masonry – Can’t Find Variable imagesLoaded
- Clear custom field when new tag is added
- Are you sure popup on Contact Form 7 [closed]
- javascript not loading in wordpress
- JS file not loading [closed]
- Carousel Hover Image
- Jquery dropdown menus working locally, but not in WordPress [duplicate]
- Why is jQuery not working properly? [closed]
- How to Javascript/jQuery