Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7579661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:43:40+00:00 2026-05-30T17:43:40+00:00

So here is my script: $(document).bind(‘mouseleave’, function(event) { // show popup console.log(you are about

  • 0

So here is my script:

$(document).bind('mouseleave', function(event) {        
            // show popup
            console.log("you are about to leave the form!");
            //Get the A tag
            var id = $("#dialog");

            //Get the screen height and width
            var maskHeight = $(document).height();
            var maskWidth = $(window).width();

            //Set heigth and width to mask to fill up the whole screen
            $('#mask').css({'width':maskWidth,'height':maskHeight});

            //transition effect     
            $('#mask').fadeIn(250); 
            $('#mask').fadeTo("slow",0.8);  

            //Get the window height and width
            var winH = $(window).height();
            var winW = $(window).width();

            //Set the popup window to center
            $(id).css('top',  winH/2-$(id).height()/2);
            $(id).css('left', winW/2-$(id).width()/2);

            //transition effect
            $(id).fadeIn(500);
    });

This code works great on all browsers BUT IE. The only time it seems to work is when I’ve activated the “developer tools” … The actual bindable “mouseleave” trigger doesn’t seem to work.

Any ideas?


It seems that IE does not like the “console.log” call to be in the method. Once I removed that reference, all worked.

Can someone enlighten me as to why that might be?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:43:42+00:00Added an answer on May 30, 2026 at 5:43 pm

    IE only supports console.log() when Developer Tools are on. I think it’s just a design decision they’ve made. You can try to overcome this in your code by defining your own logging function:

    var log = function(s) {
      try {
        console.log(s);
      } catch (e) {
        alert(s); // If you want to see annoying popups.
      }           // If not, just leave this empty.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is function , <script type=text/javascript> $(document).ready(function() { getRecordspage(1, 5); $(a.page-numbers).click(function() { alert(1); getRecordspage($(this).text(),
I have this jQuery script: <script type=text/javascript> $(document).ready(function{ $(#btnLogon).bind(click, function(){ $(#btnLogon).after('<span class=error>Please wait...</span>'); });
I have the following: $(document).ready(function(){ // bind 'myForm' and provide a simple callback function
I am generating events on fullCalendar with this code <script type=text/javascript> $(document).ready(function() { $('#calendar').fullCalendar({
this is my implementation of a Jquery tooltip: <script type=text/javascript> $(document).ready(function(){ var tiempo_espera =
I have a host with php+mysql and i need to run a script here
For example, my goal is to test the code given here: PHP script that
Here is my script: #!/bin/bash echo Digite o local em que deseja instalar o
Here is my script... all I want to do is have it continuously loop!
Here is my script #!/usr/bin/env ruby if __FILE__ == $0 `cd ..` puts `ls`

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.