About

Popup near mouse on click.

How To Use

Zip Download

First, include the jQuery, JS, and CSS in your page. You should load the JS at the bottom of the body, so it doesn't block content rendering. Only load in the JS you are going to be using.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" ></script>
<script type="text/javascript" src="cursorPopup/scripts/cursorPopupExt.js"></script>
<script type="text/javascript" src="cursorPopup/scripts/cursorPopupFn.js"></script>
/*
  The first four css attributes are required, the second four are recommended.
*/
<style>
.OCPalert{
  position:absolute;
  width:200px;
  height:20px;
  z-index:600;
			
  border:1px solid #f00;
  background-color:#d88;
  border-radius:5px;
  text-align:center;
}
</style>

There are two seperate modules, a jQuery extension and a plain JS function.

<div id="button">Click me!</div>
<div id="button2">I'll popup every other time I'm clicked!</div>
<!-- this must be included AFTER the JS is loaded in -->
<script>
  $(document).ready(function(){
	//jQuery extension. Use this if you want the Cursor Popup
    //to appear every time the element is clicked.
    $('#button').cursorPop();
    var onOff = true;
    $('#button2').click(function(){
      if(onOff){
        //Function, use this if you want the Cursor Popup to appear only
        //under certain conditions or on an event other than click
        cursorPop();
      }
      onOff = !onOff;
    });
  });
</script>
Demonstration:
Click me!
I'll popup every other time I'm clicked!

License

This plugin is not licensed. Use it as you will. Please don't claim my work as your own unless you modify it, but feel free to use it however you like.