I've never made a popup div and am trying to do so, however the code I've made, actually both attempts... doesn't throw any errors, but also doesn't seem to do anything. Am I going about this all wrong?
Here is what I got going on JSFiddle
var mX, mY;
$(document).mousemove(function (e) {
mX = e.pageX;
mY = e.pageY;
}).mouseover();
$('li span').click(function () {
var parentElm = $(this),
info = parentElm.find('.info');
info.toggle(function () {
$(this).css({
'display': 'block',
'opacity': '0.1'
}).animate({
'opacity': '1.0',
'width': '300px',
'height': '150px',
'left': mX,
'top': mY
})
},
function () {
$(this).animate({
'opacity': '0',
'width': '0',
'height': '0',
}).css({
'display': 'none',
});
});
});