View Single Post
Old 03-21-2010, 11:37 AM  
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Why are you trying to use jQuery for this when simple javascript works fine?
A clumsy, but functional way is to use the .attr handle to pass variable in the <img> tag to jQuery. eg

Code:
<script type='text/javascript'>
$(document).ready(function(){
$(".img_thumb").mouseover(
	function () {
		var var1 = $(".img_thumb").attr('var1');
		var var2 = $(".img_thumb").attr('var2');
		var var3 = $(".img_thumb").attr('var3');
		expandthumb(var1, var2, var3);
	});
});

</script>

<img class="img_thumb" src="thumb.png" var1="1" var2="657" var3="623" width="300" height="50" />
Hope this sets you down the right path
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote