Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function Tooltip() {
- var request,
- pos,
- popup,
- doc
- function over(e) {
- pos = $(this).offset()
- request = $.post('inc/info.php', {
- inf: $(this).attr('id')
- }, loaded)
- }
- function out(e) {
- request.abort()
- popup.hide()
- }
- function loaded(data) {
- popup
- .html(data)
- .css('left', pos.left)
- .css('top', pos.top + 20)
- .show()
- }
- (function init() {
- popup = $('#infopop')
- doc = $(document)
- doc.on('mouseenter', '.inf', over)
- doc.on('mouseleave', '.inf', out)
- })()
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement