[jQuery] Re: image rollover

2009-10-05 Thread jessie
Thanks so much now that works :) Also... whatabout if i want to select gif and jpg files using the code below? how do i add to it, the same? comma separated? function getLeaf(url) { var splited=url.split('?');// remove all the parameter from url url=splited[0]; return url.substring(url.lastIndex

[jQuery] Re: image rollover

2009-10-05 Thread Leonardo K
You can just do: $("#nav td, .otherclass").enter(); On Mon, Oct 5, 2009 at 07:50, jessie wrote: > > Hi > > You posted a reply but there was nothing there! LOL i can't see what > you wrote. > > Thanks > Jess :) > > On Oct 5, 3:57 pm, Piyush Moradiya wrote: > > On Sun, Oct 4, 2009 at 6:34 PM, je

[jQuery] Re: image rollover

2009-10-05 Thread jessie
Hi You posted a reply but there was nothing there! LOL i can't see what you wrote. Thanks Jess :) On Oct 5, 3:57 pm, Piyush Moradiya wrote: > On Sun, Oct 4, 2009 at 6:34 PM, jessie wrote: > > > Hi > > > I have implemented this jQuery for image rollover on href > > > The only problem is, is th

[jQuery] Re: image rollover

2009-10-05 Thread Piyush Moradiya
On Sun, Oct 4, 2009 at 6:34 PM, jessie wrote: > > Hi > > I have implemented this jQuery for image rollover on href > > The only problem is, is there a way to call more than one class for > this particular function? > $(function(){ // Document is ready > $("#nav td").enter();// call the function

[jQuery] Re: image rollover

2009-10-04 Thread jessie
can anyone help me please? On Oct 4, 11:04 pm, jessie wrote: > Hi > > I have implemented this jQuery for image rollover on href > > The only problem is, is there a way to call more than one class for > this particular function? > $(function(){  // Document is ready >  $("#nav td").enter();// ca

[jQuery] Re: image rollover

2009-02-18 Thread myjquery
OK I solved it. Here's the complete working version. $(document).ready(function() { $("li.episode").each(function(){ var $this = $(this); var image = $this.find('img'); var details = $this.find('.details'); $(this).hover(function(){

[jQuery] Re: image rollover

2009-02-18 Thread myjquery
I found one solution. But the code is bloated. I need to put it in a loop. Here 3 is the maximum li numbers. How can i put it in a loop? Thanks $(document).ready(function() { $("li.episode:nth-child(3n+0)").hover(function () { this>$('li.episode:nth-child(3n+0) img').addClass("backgro

[jQuery] Re: image rollover

2009-02-18 Thread myjquery
Thanks guys. I'll test these out. Will post the results soon. On Feb 18, 11:43 am, mkmanning wrote: > You can take a slightly different approach, which might simplify your > markup, css and js. Since you're using absolute positioning, you can > absolutely position your image over your text, then

[jQuery] Re: image rollover

2009-02-18 Thread mkmanning
You can take a slightly different approach, which might simplify your markup, css and js. Since you're using absolute positioning, you can absolutely position your image over your text, then just toggle the opacity on hover to reveal the text underneath. One advantage with this approach is you're

[jQuery] Re: image rollover

2009-02-18 Thread Leonardo K
Assign the event to the element li and not the image. Because if you display a text over the image, you will lose the event mouseover. $(document).ready(function() { $("li.episode").mouseover(function () { $(this).addClass("background"); $('div.details').addClass("show"); });

[jQuery] Re: Image rollover effects in Superfish menu

2009-02-17 Thread Matt
I wrote that other post that Steve mentioned, and probably should update it since I have made some slight changes to be a little more semantically correct. First, to directly answer your question, you'll need some CSS markup like this: li:hover > a#b1 em, li.sfHover > a#b1 em {background-positio

[jQuery] Re: Image rollover effects in Superfish menu

2009-02-17 Thread Steve Piercy
See this post. http://groups.google.com/group/jquery-en/browse_thread/thread/1801c70c34167ab6/6c934d51612fc7f5?lnk=gst&q=superfish+hover+top+level#6c934d51612fc7f5 I'm experimenting with how to do the same thing, but without the extra markup of . --steve On Feb 1, 4:51 am, Simbarashe wrote: >

[jQuery] Re: Image rollover using jQuery

2008-12-02 Thread Ray M
Thank you. This is exactly what I want! On Dec 1, 12:46 pm, howa <[EMAIL PROTECTED]> wrote: > http://code.google.com/p/jquery-swapimage/ Ray

[jQuery] Re: Image rollover using jQuery

2008-12-01 Thread Andy Matthews
_off.gif'; }); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of howa Sent: Sunday, November 30, 2008 10:46 PM To: jQuery (English) Subject: [jQuery] Re: Image rollover using jQuery Maybe this: http://code.google.com/p/jquery-swapimage

[jQuery] Re: Image rollover using jQuery

2008-11-30 Thread seasoup
plugin? How about the native .hover? $('img').hover(function() { $(this).attr('src',path + '' + $('this).attr('id') + '_over.gif'; }, function() { $(this).attr('src',path + '' + $('this).attr('id') + '_off.gif'; }); That will make every image on the page a rollover, changing the src of the

[jQuery] Re: Image rollover using jQuery

2008-11-30 Thread howa
Maybe this: http://code.google.com/p/jquery-swapimage/ On Nov 30, 5:14 pm, Ray M <[EMAIL PROTECTED]> wrote: > Hello, > > Are there any existing jQuery plugin which can provide similar image > rollover functions such as the one provided by Dreamweaver? > > Thanks. > > Ray

[jQuery] Re: Image rollover using jQuery

2008-11-30 Thread Karl Swedberg
On Nov 30, 2008, at 4:14 AM, Ray M wrote: Hello, Are there any existing jQuery plugin which can provide similar image rollover functions such as the one provided by Dreamweaver? Thanks. Ray Hi Ray, If you're referring to the dreaded MM_swapImage(), I think most people these days just u

[jQuery] Re: Image rollover plugin?

2007-09-06 Thread Collin Allen
Unless it's something complicated, CSS is usually the way to do it and avoid scripting altogether. Note that you can change more than one element's style using a little CSS trick: a:hover { /* change the A tag style */ } a:hover span { /* change the SPAN inside the A, including the A style

[jQuery] Re: Image rollover plugin?

2007-09-06 Thread Glen Lipka
I agree using CSS is good IF the thing you are hovering over is an tag. Many times you want to do something a little more complex, like hovering over a or tag. Also, the hover tag is useful to make hover on element A affect the look of elementB. $("p").hover(function(){ $(this).addClass("hove

[jQuery] Re: Image rollover plugin?

2007-09-06 Thread Michael Stuhr
Glen Lipka schrieb: This seems like massive overkill to me. What's wrong with the hover function in the core API? and how would that look like ? as i already said: if you plan wisely i think all you need is css. just wanted to give an understandable example. micha

[jQuery] Re: Image rollover plugin?

2007-09-06 Thread Andy Matthews
query-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: Thursday, September 06, 2007 12:23 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Image rollover plugin? Could you be a little more specific? Maybe show a page that has the kind of effect you are looking fo

[jQuery] Re: Image rollover plugin?

2007-09-06 Thread Glen Lipka
This seems like massive overkill to me. What's wrong with the hover function in the core API? Glen On 9/6/07, Michael Stuhr <[EMAIL PROTECTED]> wrote: > > > howa schrieb: > > Something like what dreamweaver provide, are there such as plugin in > > jQuery? > > > > Thanks. > > > > > function onMou

[jQuery] Re: Image rollover plugin?

2007-09-06 Thread Michael Stuhr
howa schrieb: > Something like what dreamweaver provide, are there such as plugin in > jQuery? > > Thanks. > > function onMouseOver () { var file = $j(this).attr("src"); var filetype = file.substr(-4); file = file.substr(0, file.length - 4); $j(this).attr("src",

[jQuery] Re: Image rollover plugin?

2007-09-06 Thread Mika Tuupola
On Sep 6, 2007, at 8:09 PM, howa wrote: Something like what dreamweaver provide, are there such as plugin in Not exactly a plugin but check the second code snippet in this page: http://www.appelsiini.net/2007/6/sequentially-preloading-images -- Mika Tuupola http://www.appelsiini.net/

[jQuery] Re: Image rollover plugin?

2007-09-06 Thread Glen Lipka
In general, you dont need a plugin for this. Check the API for hover. $("p").hover(function(){ $(this).addClass("hover"); },function(){ $(this).removeClass("hover"); }); This can achieve your goal in alot of ways. The CSS class could have an image-sprite background. See my examples here. l

[jQuery] Re: Image rollover plugin?

2007-09-06 Thread howa
Rollover button (image), i.e. the classifcal MM_rollOver() & MM_preloadImage() functions replacement using jQuery. On 9月7日, 上午1時22分, "Glen Lipka" <[EMAIL PROTECTED]> wrote: > Could you be a little more specific? > Maybe show a page that has the kind of effect you are looking for? > > I think

[jQuery] Re: Image rollover plugin?

2007-09-06 Thread Glen Lipka
Could you be a little more specific? Maybe show a page that has the kind of effect you are looking for? I think the answer is Yes, but you need to be more specific, there are alot of different variations. You may not need a plugin at all. Glen On 9/6/07, howa <[EMAIL PROTECTED]> wrote: > > > Som