View Single Post
Old 10-05-2012, 07:13 PM   PM User | #5
m2244
Regular Coder

 
Join Date: Jun 2012
Posts: 129
Thanks: 1
Thanked 1 Time in 1 Post
m2244 is an unknown quantity at this point
Quote:
Originally Posted by DanInMa View Post
you want somethign like this: ( using 1.7+)


Code:
$('a.glossaryLink').on("hover", function(e){
		onRollOverPULink();
	});
no need for the return false on a hover
Why is this still not working correctly? In IE I get 2 alerts each time I hover. In FF I don't get any.

This div is populated using JS.
Code:
	<div id="containerContainer">
		<!--[if IE 6]><br/><br/><![endif]-->
		<div id="contentContainer"></div>
		<div id="flow"></div>
	</div>
This is the HTML content that is added to the div above.
Code:
<ul>
  <li>
    	(U) Spiral 1.5: <a class="glossaryLink" href="#">SCCVI</a> and <a class="glossaryLink" href="#">SCRI</a>  </li>
  <li> (U) Spiral 2:  <a class="glossaryLink" href="#">HBSS</a>  </li>
</ul>
THis is the JS function that loads the html content.
Code:
function loadDivHTML(div_id, content_src)
{
	$("#" + div_id).load(content_src, bookmark);
	setGlossLinkListeners(); //Each time new content is loaded this function sets listeners on PU links.
}
Code:
function setGlossLinkListeners()
{
$('#contentContainer a.glossaryLink').on('hover', function(){
			onRollOverPULink(); 
	});
}

function onRollOverPULink() //e, txt
{
	alert("onRollOverPULink");
}
m2244 is offline   Reply With Quote