Mootools tooltip used inside of jquery??

Posted on 2009-07-03
Last Modified: 2013-11-19
Hi all,

The code below shows three thumbnails with link and alt text . The
info is coming  from the xml file and I'm using $.ajax to place it in
the page.

Now I want to add a tooltip that is using Mootools.

I have to add title="The tooltip::I want to read" class="tipz" to the
div (or to the image, changing the function) in order to use the

But when generating the code dynamically using $.ajax, the tooltip
code will work always for Safari (though it only shows half the
tooltip), but just sometimes for IE and Firefox.
When it does not work, the text shows like a normal alt tag text.
Using IE or Firefox just keep reloading the page and put your mouse
over the thumbnails to test it,  you'll see what I mean.

I'm adding an example at the bottom of the page (the div called
example) so you can see how nicely it works in a static div.

The code is below, but you can see it in action:

Can it be done? Can I add the tooltip to the dynamically generated
code? Seems that the tooltip code go wrong when acts before the div is
created .. is that the problem? how can I solve it?

Thanks a ton!
<script type="text/javascript" src=""></script>

<script language="javascript" type="text/ecmascript" src=""></script>








	position: absolute;








	position: absolute;








	position: absolute;








	.tip				{ width:139px; font-family:arial; COLOR: #fff;	line-height: 16px; }

		.tip-top			{ }

		.tip-title		{ 	PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-FAMILY:Arial; FONT-WEIGHT: bold; FONT-SIZE: 12px; BACKGROUND: url( left top; PADDING-BOTTOM: 4px; MARGIN: 0px; COLOR: #ff2228; PADDING-TOP: 8px }

		.tip-text		{ 	PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-FAMILY:Arial; FONT-SIZE: 11px; BACKGROUND: url( right bottom; PADDING-BOTTOM: 8px; PADDING-TOP: 4p}

		.tip-bottom		{ }




	position: absolute;






















  	//store titles and text

			$$('div.tipz').each(function(element,index) {

				var content = element.get('title').split('::');'tip:title', content[0]);'tip:text', content[1]);



			//create the tooltips

			var tipz = new Tips('.tipz',{

				className: 'tipz',

				fixed: false,

				hideDelay: 50,

				showDelay: 50







				type: "GET",

				url: "myxml.xml",

				dataType: "xml",

				success: function(xml) {


						//var numero = $(this).attr('id');

						var number = jQuery(this).find('number').text();

						var alt = jQuery(this).find('alt').text();

						var ids = jQuery(this).find('ids').text();

						var thumb = jQuery(this).find('thumb').text();



   	jQuery('<div title="'+alt+'" class="tipz" id="thumb'+number+'"></div>').html('<a target="_parent" href="'+ids+'"><img src="'+thumb+'.jpg" alt="'+alt+'" width=82 height=62 border=0 ></a>').appendTo('#content');




















	<div id="content">






<div id="example" title="The tooltip::I want to read" class="tipz">Put your mouse over here <img src="" border="0"></div>


////////////////////////// the xml file below/////////////////////////////////////////////////////////////


<?xml version="1.0" encoding="iso-8859-1"?>







        <alt>Some text 1</alt>









        <alt>Some text 2</alt>











        <alt>Some text 3</alt>





Open in new window

Question by:Dada44
LVL 35

Accepted Solution

TimYates earned 250 total points
Comment Utility
The latest MooTools framework introduced a compatibility mode, so you could use mootools with another framework (in your case, jquery)

However, it's not recommended...  Isn't there a jQuery toltip plugin you could use?  There are probably hundreds of them

LVL 40

Assisted Solution

RQuadling earned 250 total points
Comment Utility
jQuery also has a compatibility mode. Make sure they are all is use.

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now