Results 1 to 6 of 6
Threaded View
-
17th Oct 2010, 09:02 AM #1OPMemberWebsite's:
maxneeds.infojQuery tooltip help :S
Hi !
I am currently using jquery tooltip to replace the ordinary title attributes and it is quite well,but there is only one problem : tooltips do not update in time..
Lets say i have : <img src=balba.jpg title='not clicked' onclick=this.title='clicked'> ..
Simply when user clicks the image the tooltip does not change to 'clicked' and stays 'not clicked'
Anyone can give me a script ?
Here's my current one :
Code:/** * * simpleTooltip jQuery plugin, by Marius ILIE * visit http://dev.mariusilie.net for details * **/ (function($){ $.fn.simpletooltip = function(){ return this.each(function() { var text = $(this).attr("title"); $(this).attr("title", ""); if(text != undefined) { $(this).hover(function(e){ var tipX = e.pageX + 12; var tipY = e.pageY + 12; $(this).attr("title", ""); $("body").append("<div id='simpleTooltip' style='position: absolute; z-index: 100; display: block;'>" + text + "</div>"); if($.browser.msie) var tipWidth = $("#simpleTooltip").outerWidth(true) else var tipWidth = $("#simpleTooltip").width() $("#simpleTooltip").width(tipWidth); $("#simpleTooltip").css("left", tipX).css("top", tipY).fadeTo("fast", 0.80); }, function(){ $("#simpleTooltip").remove(); $(this).attr("title", text); }); $(this).mousemove(function(e){ var tipX = e.pageX + 12; var tipY = e.pageY + 12; var tipWidth = $("#simpleTooltip").outerWidth(true); var tipHeight = $("#simpleTooltip").outerHeight(true); if(tipX + tipWidth > $(window).scrollLeft() + $(window).width()) tipX = e.pageX - tipWidth; if($(window).height()+$(window).scrollTop() < tipY + tipHeight) tipY = e.pageY - tipHeight; $("#simpleTooltip").css("left", tipX).css("top", tipY).fadeTo("fast", 0.80); }); } }); }})(jQuery);
Porsche_maniak Reviewed by Porsche_maniak on . jQuery tooltip help :S Hi ! I am currently using jquery tooltip to replace the ordinary title attributes and it is quite well,but there is only one problem : tooltips do not update in time.. Lets say i have : <img src=balba.jpg title='not clicked' onclick=this.title='clicked'> .. Simply when user clicks the image the tooltip does not change to 'clicked' and stays 'not clicked' :S Anyone can give me a script ? Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
JQuery and RegExr Help :|
By Porsche_maniak in forum Web Development AreaReplies: 4Last Post: 1st Jun 2012, 12:26 AM -
[Hiring] Coder with exp in DLE, jquery
By newshit in forum Completed TransactionsReplies: 0Last Post: 11th Jan 2012, 09:42 PM -
JQuery help
By xElliex in forum Web Development AreaReplies: 5Last Post: 25th Aug 2011, 10:38 PM -
jQuery tooltip help
By devilzkrazy in forum Technical Help Desk SupportReplies: 0Last Post: 22nd May 2010, 04:24 PM -
Introduction to jQuery
By litewarez in forum Tutorials and GuidesReplies: 4Last Post: 14th Jan 2010, 02:51 AM
themaCreator - create posts from...
Version 3.53 released. Open older version (or...