0

Hey i need some help, ive done a javascript that will create a small popup when the user a link, just like the one on this forum when u touch a thread and you can read a small part of it.

this is the code and my problem is that the first time the user touch the link the div shows up in the left corner after that it works perfect.

var box = $('<div></div>').addClass('up-tables_showmorePop');
var x,y;
var timer;
$(document).ready(function(){
	$('a.table-showmore').mouseover(function(e){
		x = e.pageX;
		y = e.pageY;
		timer = window.setTimeout('Pop()', 500);		 
	}).mouseout(function(){
		clearTimeout(timer);
		box.hide();						
	});						   
});

function Pop(){
	$('div.up-tables_showmorePop').css('left', x + 10);
	$('div.up-tables_showmorePop').css('top', y - $('div.up-tables_showmorePop').height() - 10);	
	$('body').prepend(box);
	box.fadeIn();
}
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by shanyuva
0

Hi to All,
how to Add node in a treeview without using any kind of server side function and purely in javascript.
thanks,
Regards,
yuva

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.