Created
July 29, 2008 19:39
-
-
Save pol/3156 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
//<![CDATA[ | |
//haHA This works! It could probably use some refactoring. | |
$(document).ready(function(){ | |
$(".help_icon").click(function(){ | |
help_icon = $(this); | |
help_container = help_icon.parent(); | |
help = help_icon.siblings('.help_dialog'); | |
help.css('display','block') | |
help.dialog({ | |
close: function(){ | |
help.css('display','none'); | |
help_container.append(help); | |
} | |
}); | |
}); | |
}); | |
//]]> | |
</script> | |
<p>Item 1 | |
<span class="help_container"> | |
<img class="help_icon" title="Click for more information." src="/images/icons/help.gif" alt="help alt"/> | |
<div class="help_dialog">Help Text for Item1</div> | |
</span> | |
</p> | |
<p>Item 2 | |
<span class="help_container"> | |
<img class="help_icon" title="Click for more information." src="/images/icons/help.gif" alt="help alt"/> | |
<div class="help_dialog">Help Text for the Item2</div> | |
</span> | |
<p>Item 3 | |
<span class="help_container"> | |
<img class="help_icon" title="Click for more information." src="/images/icons/help.gif" alt="help alt"/> | |
<div class="help_dialog">Help Text for the Item3</div> | |
</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment