Hi Glen.
I'm late to the thread (and this is probably a bit off-topic for this list)
but up until the point where you asked for the cross-fade, everything you need
can be done with vanilla CSS, no need to involve jquery at all.
In the page:
a class=available-button href=whatever.php
Currently
Hey Mark!
Thanks for taking the time to respond! That is a great way to do it. I
am learning jquery so I wanted to see how to do it in jquery. As you
can see im having a tough time with it lol.
thanks for the feedback though
Glen
On Jan 7, 9:53 pm, Mark Kelly wastedti...@gmail.com wrote:
Hi
$(this).attr({'img src' : './images/avail_hover.png'});
there is no img src attr, but there is src, so
$(this).attr('src', './images/avail_hover.png');
and there's a second event to hook on the .hover event is when you
mouse off, so use that event to revert back to whatever image was
there
On
I have it now set up like this:
$(#footer #footer-contain #availability img).hover(function () {
$(this).attr('src', './images/avail_hover.png'});
}
it still isnt working. I orig. had it set as src. but nothing seemed
to be working then so i messed around and changed
Perhaps the path to the image itself isn't ./images ?
Other than that,maybe some more code to show or better yet a live, non-
working page..
Rest assured the hover event does work, and the way to set an
img's source is $(this).attr(src) ... there's something else not
does the attr function change the img source or does it add it in?
Perhaps I need a different function to do it? is that possible?
i am going to try to add a the remove attr function first, then run
the current one and see if that works...
On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote:
it changes it
http://docs.jquery.com/Attributes/attr#keyvalue
attr( key, value )
Set a single property to a value, on all matched elements
going a different direction isn't the solution, something else is
wrong.
and your current one of img src as an attribute name is not going
to work,
I put up my site quickly here: http://www.glenhealy.com/
the image should be at the bottom in the footer, if you can view the code,
maybe you can see what the deal is?
i used the exact code used in the example so there has to be a file issue
On Thu, Jan 7, 2010 at 12:44 PM, MorningZ
ready to know what a major problem is??
your script.js is:
$(document).ready(function() {
// do stuff when DOM is ready
$(#footer #footer-contain #availability img).hover(
function() {
$(this).attr(src, ./images/avail_hover.png);
},
here's your exact code working
http://jsbin.com/aguji/edit
http://jsbin.com/aguji
On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote:
ready to know what a major problem is??
your script.js is:
$(document).ready(function() {
// do stuff when DOM is ready
$(#footer #footer-contain
wow. thank you for your patience with me lol. This jquery is cool and
all just a little stressful at times.
thanks again for your help
On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote:
ready to know what a major problem is??
your script.js is:
$(document).ready(function() {
//
Here is another question if you have the time,
now that the image changes on hover, can I add a fade animation so
that it fades to the hover image as opposed to switching back and
forth? or would I have to create a whole new function?
On Jan 7, 1:38 pm, MorningZ morni...@gmail.com wrote:
here's
like so?
http://jsbin.com/amuma3/edit
http://jsbin.com/amuma3
On Jan 7, 1:45 pm, Glen_H glen.f.he...@gmail.com wrote:
Here is another question if you have the time,
now that the image changes on hover, can I add a fade animation so
that it fades to the hover image as opposed to switching
no more like a slowdown in the transition between the images. hope that
makes sense. lol. Like if you move over it now really fast it is twitchy
im thinking what if it were possible to add like a ms or 2 to the actual
hover effect and they will blend more.
instead of fading out they fade into one
I'd suggest reading through this blog post:
http://jqueryfordesigners.com/image-cross-fade-transition/
On Jan 7, 2:14 pm, Glen Healy glen.f.he...@gmail.com wrote:
no more like a slowdown in the transition between the images. hope that
makes sense. lol. Like if you move over it now really fast
On Dec 12, 2007, at 8:49 PM, Glen Lipka wrote:
I have a nav that I do not control the HTML Source.
div class=nav
a href=foo.htmimg src=foo.gif //a
a href=bar.htmimg src=bar.gif //a
/div
I want to have a hover event applied to the IMG so that when you
hover over the img src changes
Perfect thanks. I didn't try that second one, but I will give it a go.
Glen
On Dec 12, 2007 1:24 PM, Mika Tuupola [EMAIL PROTECTED] wrote:
On Dec 12, 2007, at 8:49 PM, Glen Lipka wrote:
I have a nav that I do not control the HTML Source.
div class=nav
a href=foo.htmimg
17 matches
Mail list logo