Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-21-2010, 08:14 AM   #1
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,855
little jquery help

how would i do this in jquery

Code:
onmouseout="reducethumb(1); return false;"

onmouseover="expandthumb(1, 657, 623);"
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Tube Themes
fris is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-21-2010, 08:43 AM   #2
ScriptWorkz
Confirmed User
 
Industry Role:
Join Date: Jul 2007
Location: Intraweb
Posts: 274
Code:
$(".selector").hover(function() { reducethumb(1); return false; }, function () {
expandthumb(1, 657, 623);
});

Last edited by ScriptWorkz; 03-21-2010 at 08:43 AM.. Reason: typo
ScriptWorkz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-21-2010, 08:46 AM   #3
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,855
how bout for each one. i have this

Code:
<img src="full.png" alt="" class="grow" id="screen1"
onmouseout="reducethumb(1); return false;" width="240" height="227" />
<img src="thumb.png" alt="" class="shrink" id="thumb1"
onmouseover="expandthumb(1, 657, 623);">
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Tube Themes
fris is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-21-2010, 10:50 AM   #4
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,855
bump for scriptworkz
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Tube Themes
fris is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-21-2010, 11:37 AM   #5
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
Old 03-21-2010, 12:00 PM   #6
ScriptWorkz
Confirmed User
 
Industry Role:
Join Date: Jul 2007
Location: Intraweb
Posts: 274
Quote:
<img src="full.png" alt="" class="grow" id="screen1"
onmouseout="reducethumb(1); return false;" width="240" height="227" />
<img src="thumb.png" alt="" class="shrink" id="thumb1"
onmouseover="expandthumb(1, 657, 623);">
to do each one you'd just have to apply it to each one,
Code:
$(".grow").hover(function() { }, function() {
 reducethumb(1);
});

$(".shrink").hover(function() {
  expandthumb(1, 657, 623);
}, function() {});
first chunk adds reducethumb to mouse out on all images w/ class of grow, second one adds expand thumb to all images w/ class 'shrink'. You can fill out the empty functions in each to do something on mouseover / mouseout respectively.
ScriptWorkz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.