At the request of one of our viewers, I’ll show you how to mimic the image functionality seen here. Though, at first glance, it might appear to be difficult, don’t worry! It’s actually quite simple. I’ll show you how.



Day 8: User Request - Image Slides.

Download the Source Code


Comments

Leave a Comment
  1. Awesome tutorial!

  2. Outch… This Video Series about jQuey is AMAZING. Thanks a lot Jeffrey. Could you put these videos available for download?

  3. @Juarez - Yep! I plan on doing that once they’re all done. I think I’ll go to Day 15. I’ll keep everyone posted.

  4. Thanks Jeffrey. This is something that would benefit my portfolio(in the works)

  5. Gravatar

    Andrew Turner

    Hey Jeffery, When you get a chance would you be able to do a tutorial on Jquery Tabs, much like the ones on the Themeforest Homepage and across the TUTs Sites.

    Thanks,
    Andrew Turner

  6. i want more information on the Sortable.

  7. Using Chrome? So sad. Yay Opera!

  8. The text should ideally be real text inside a div, not an inaccessible image. I’m sure you could easily tweak the code to make this happen.

  9. Keep em going past day 15! These videos are great.

  10. Hey Jeffrey,

    Can you do a similar video on a ‘tool tip’ effect when you over over something. I would like to do something like this to my portfolio (http://www.furtzdesigns.com/portfolio.html) on the jflow selectors.

    For example, when you hover over ‘1′ and small description fades in and slides up, like the name of the portfolio item. I tried it myself but it failed.

    I would really appreciate it if you could teach me how to do this, and I’m sure someone else out there will find it useful ;P

  11. Gravatar

    chris simpson

    @Jeffery - you’ve made me a jQuery addict. These tutorials should come with a health warning, i’m allready shaking in need of my next fix. And the thought of the tutorials stopping at Day 15…

    ;)

    Thanks again for providing this great resource to the community!

  12. Thanks for a great series.

    @Ryan - Hope Jeffrery dosn’t mind me linking to someone else’s tutorials but I think this is what you are looking for Webdesignerwall(number 5).

  13. Great Jeffrey! Thanks for explaining

    I’ve learned a lot

    Keep it up!! :)

  14. Gravatar

    chris simpson

    it’s not to hard tweak this to use an accessible div of styled text, instead of a flat image, just like kyan’s.

    What would be awesome is you could use jquery to extract the alt=”" text attribute to use as the text. does anyone know if this is possible??

  15. @Chris -

    Yeah - that would be simple.

    var text = $(’#someImage’).attr(’alt’);

    This will store the value of the alt attribute in the “text” variable.

  16. Gravatar

    chrissimpson

    @Jeffery - Perfect. Thanks so much! :]

  17. You are my new hero. These jQuery examples are so good - even for non-javascript people like me they make more sense!

    I particularly like that these are an intro, whereas your NETTUTS ones are for development projects because they show the whys and wheres - awesome!

  18. @Jeff - Thanks! Yeah, these videos are specifically for non-javascript people. That’s why I go over each step so many times. :)

    I’d like to follow a similar format for other things as well. Maybe PHP? CSS?

  19. Awesome! They just keep getting better, i can’t wait for the next one :3 …

  20. Holy jQuery Batman!!!

    Jeffrey,
    I just came across these jQuery tutorials and just gobbled them up all in one day!
    I have wanted to get into jQuery but havn’t had any motivation. These tutorials did the trick, so easy to follow and understand.
    Rock on bro!

    BTW I subscribed to the RSS feed.
    Thanks again!

  21. @Timo - Fantastic. Glad to hear it.

    Well keep checking back. I typically post a new one every other day. Thanks again!

  22. @Jeffrey I’d just like to reiterate what some of the some of the others have said and say thanks for doing these! If you were going to move into other areas i’d like to stick a vote in for “PHP for Beginners” ;)

  23. @Steve, @chris - on http://kyanmedia.com the “behind image” *is* actually text, not a separate image.

  24. Hi, I wrote the original code for this effect and I thought I’d put together a quick blog post about exactly how I did it: http://blog.kyanmedia.com/archives/2008/12/10/easy_image_rollovers/ . It’s nice to hear that people like it :)

  25. Gravatar

    chrissimpson

    Jeffery - You should get this series added to the tutorials list on jquery.com, it would be a great resource for years to come, and also help drive the well deserved traffic to this site..

    nice one :)

  26. Thank you so much for these video tutorials series i love them

    i was wondering if you show us how we can use jquery ajax with php

  27. @chrissimpson - Good point! I did that recently for NETTUTS, but forgot about this series. I just did it.

    Thanks for the suggestion!

  28. @i-mad - Yep! That’s coming next week.

  29. jQuery has changed my life because of you.

  30. Hi Jeffrey,

    Thanks a lot for this jQuery tutorials! They are really great and easy to follow. The best I’ve found on the web.

    I would like to see some examples of using cookies with jQuery. Can you recommend us some essential jQuery plugins?

  31. Usefull tutorials, thx!!!

  32. I like this effect and your video tutorial explains it very well.

    It would be great if you could create a short video on how to effectively create a three columned page layout with draggable/sortable DIVs across the columns with a slide effect.

    Not many sites showing all these effects together and I think it would be really useful.

    Apart from that great effort thanks!

    Ian.

  33. Hi Jeffery

    Another great tutorial, thanks very much for doing these.

    Is there any way you can revert to the old player? The new one has no controls for pause etc. and download speed is very poor.

    Thanks again!
    Andrew

  34. Hey Jeffery,

    Great Tutorial! Thanks for all of your hard work.

    I was wondering if you could do a tutorial on the effect that is on this ThemeForest template. http://www.kriesi.at/demos/sleekbusiness/ THis is a pretty cool effect to replace flash banners.

    Matt G

  35. You are so awesome. This is by far one of the most helpful tuts on the web, and I appreciate you taking the time to provide such insight on a regular basis. ;)

  36. Really enjoying your screencasts… I do however worry that some new jS developers wont think about this from a progressive enhancement pov.

    I work for mainstream and so we often have to think of users without Javascript… :)

    If I were to do it, I would have lots of the CSS being injected from the Javascript pov (eg the images being pos:absol) so that if the user doesn’t have jS - they’ll see both images and be none the wiser.

    @kaichanvong

  37. Thanks. Great series.

  38. Gravatar

    Gustavo Scanferla

    Someone clicked in the WORM at the Kyanmedia site footer? LOL!

  39. youre da man! buddy!!!! Loved it!!!

  40. What happened to the debugging tutorial? (great series so far!)

  41. Don’t quit at 15! This series is excellent. If you do another series, I vote for php.

  42. Very nice tut!
    However i couldn t put a link on the hidden image and can t figure out how this would be done, can you help me?
    When i put the back image inside the function stops working

  43. Well I found out that if i put the link outside the wrap division it works but this won t be a valid code i guess…anyway it works this way, if someone got a better way… :)

  44. Dood !! What happened to the feeds ? the last episode that came up in iTunes was Day 6 now nothing comes up at all . Any Ideas ?

  45. Thanks for the tutorials - one quick question - while doing this one (day 8) I get an error from my firebug that says

    ‘Expected end of value for property but found ‘lem’. Error in parsing value for property ‘padding’. Declaration dropped.’

    I verified everything and it all looks good. If I remove padding: 0 lem; from the wrap css, the error goes away. The only thing different between your example and my code is that my images are a different size.

    Any thoughts on this? My CSS skills aren’t great but I’m working on those simultaneously as I work on my jquery.

    THANKS!

  46. Many, many, many thanks. A whole new world is beginning to open up in my mind.

  47. @jeff: That should be 1em, not lem.

  48. What about hyperlinks? Great tutorial on replicating… I like this code better than the original… but for me it’s unprofitable without being able to make the images linkable… and valid.

  49. @Brice & Jt
    I was having the same issue with a link, then i went to the source - Kyan Website. They have a little blog about the code they used. Basically I just changed the children declaration to find, similar to how Kyan does it and it allowed me to do what I want with the links.

    See if it works for you as well.

    And my hat’s off to the themeforest blog for this series. it finally gave me the push to learn more about jquery.

  50. Hi Jeffrey,

    first of all; Great stuff, many thanks :D

    but the day 7 movie doesnt work for me :(
    and youre saying that your explaining the “stop” in that one..

    thanks!

  51. I suspect the answer to my question is in the day 7 tutorial, but that one is not working for me.

    I noticed the function for hovering off the image is tacked on after the hover function. Why doesn’t the image immediately slide back up after it slides down? Why does it wait until you hover off?

    Thanks for the tutorials, they are extremely helpful!

  52. To much time with CSS and not enough jquery, if you don’t no CSS you shouldn’t be watching these tutorials.

  53. Video series is great. If ou do anything else, I vote fo php!

  54. I’d like to add my thanks for this series of videos. I’m just starting with jQuery and this is a great introduction.

    I’m having a problem with this one though, and was wondering if anyone else was having the same issue and if Jeffrey or anyone has a solution.

    The problem is IE. Both versions 6 and 7 aren’t displaying the ‘bottom’ image, so when the top image slides down there is nothing underneath. FF is fine.

    Any ideas?

    Thanks

    Neil

  55. Please ignore my last post, except for the thanks for the videos of course!

    The IE issue was with my sloppy code. I had missed a closing tag (>) on the wrap divs. FF had no problem with it, but IE didn’t like it.

    It’s amazing how long you can stare at a piece of simple code and not see the seemingly glaring obvious mistake!

  56. How would you make these rollovers clickable…

    perhaps?

    It works in firefox not in IE…

  57. I can’t wait until they’re all done! Since I’m still learning, I use a lot of cheat sheets. I always have my iPhone with me, so I keep them there for handy reference - even offline. The best jQuery cheat sheet I’ve found so far is from these guys:

    http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=302090867&mt=8

    They also have great cheat sheets for CSS and PHP. Hope this is helpful.

  58. Hey Jeffrey, great series! I can’t get anything past 7 to play today though (the ones hosted with Viddyou). When you get a chance you may want to look into that :)

  59. why is it not working any more

    please fix it.

    thank you

  60. Hey Jeffrey,

    Not able to view any classes after #7. As John pointed out the ones hosted with Viddyou don’t work.

    Thanks you for the screencasts and hope you fix it soon :)

  61. HeY Man, fix it plz. I can’t to learn more =(

  62. Hi everyone. The problem is that we had to switch services. I’d swear that I downloaded all of the necessary files, but I can’t seem to find Day 8 or 9. I may have to record these again.

    If anyone has downloaded a copy, please email me at sitemanager@themeforest.net.

  63. glad i checked the comments before i complained! I love these tuts so much. FINALLY i’m getting a grip on jquery and i owe it all to you. Hope these get up soon! But it’s hard to complain when everything has been so great!

  64. Glad to see the videos are back up. Can’t wait to get home and watch them. They are blocked where I work :/

  65. Fantastic tutorials. Without them I would still be struggling. But sorry, I still can’t see number 8 and 9…………….

  66. Jeff .. we are still waiting for the videos…i am still not able to play them…

  67. hi jeff
    i am waiting for the videos…i am still not able to play them

  68. Nevermind! I just read your post about loosing 8 and 9.

  69. Jeff. You rock the house. I have one question that not related. In one of your other videos, you mentioned why “background-color:#cc0000″ does not work in the “#container” tag. I can’t find the answer. Can you elaborate?

  70. The jQuery tutorials day 8 and 9 do not load, at least not on my machine. Nothing happens when clicking on the play button in the middle of the screen, but when I click on the one, which should show on the skin, an new tab opens in the browser with address http://www.viddyou.com/. This is only with the videos day8 and 9, the later days work alright again.. Apparently nobody else encountered that problem.

  71. Apologies, just saw that others had the same problem, but apparently still not solved

  72. Hey Jeffrey great tuts! But #8 is the one i REEEEEEEEEALLY wanna see and i’m getting the Viddyou thing others have mentioned. Any word on this?

    Your tuts are preventing me going and playing in the snow in snowy old Enland, because they’re so good!

  73. England*

  74. The video won’t load for me either. Dang.

  75. Doesn’t work for me either. The timeline is 0:00 and won’t play.

  76. I’d love to get this video working. Days 1 ~ 7 have been tremendous.

  77. Hey Jeffery, great job with these tutorials! How about a beyond the basics when the beginner series is done? I’d love to get more in depth with jQuery and these videos are a great method of teaching. Thanks again!

  78. Thanks for putting this series together!

    Here’s a slightly different approach to this same problem:

    * Combine the two images (top and bottom) into one image (but they are stacked on top of each other.)
    * Set that image to be the background of wrap div
    * On hover, animate the background-image position to be -300px

    Why would you consider this approach?

    * It’ll have a slightly different effect visually since both images will look like they are moving.
    * You could have the wrap div contain the text that is in the images and hide the text using Javascript. This would give you the advantage of SEO without compromising visual effect.
    * Slightly cleaner HTML

    Melvin Ram
    Volcanic Marketing (creators of BrainBank)

  79. Semantics!!!?? If you actually look at the source code on the Kyan site you will see that the text is infact HTML not an image. The image of James Bond is an tag. This markup is semantic but also allows the js to work well.

    Why did you choose to ignore this fact>

  80. hi!

    i noticed, that you incuded the wron source in the package ;)

    greets,
    pat

  81. great tutorials. Really helping me update my website to look more professional.

    Do you have an address that i can contact you on? I have some questions about hovering on a small image to get a larger image to fade in.

    Any help would be appreciated.

    Thx

  82. I’ve never smiled so much in one day. I just worked through 1-7 and will probably finish the whole 15 today. Thank you…these tutorials rock!

  83. Absolutely these tuts are the best learning method of JQuery
    Is there any way to download these?

  84. Hi, the download source code is for other tutorial.. can you please upload the one for this sample…

    Thanks!!

    this videos are awesome!!!

  85. Thanks Jeff a lot :D
    I made a bit of code inspired by you!
    But in the version instead of the back image you can have text in it. Here’s the code:

    Inspired By Jeff!

    $(function(){
    $(”li”).hover(function(){$(this).children(”img”).stop().animate({”paddingTop”:”142px”,”opacity”:.5},”fast”);},function(){$(this).children(”img”).stop().animate({”paddingTop”:”0″, “opacity”:1});});
    });

    ul li{list-style:none; float:left; height:142px; width:145px; overflow:hidden; position:relative; padding:0 5px}
    ul li img{position:absolute; top:0; left:0}

    This is a Text 1
    This is a Text 2
    This is a Text 3
    This is a Text 4

    Again i would like to thank you for these awesome tutorials :D

  86. Hi

    I am trying to subscribe but dont know why its not subscribing me.

    I am really enjoying ur tutorials and they give me confidence to work with JQuery.

    Its really very nice.

    I am an absolute beginner and would like to know how can we do what they have on the site http://www.kpnvandaag.nl/#home/.

    I know till 8th day tutorial we learnt to slide, fade, toggle and to add an element and remove element and all but was wondering how do I do all these together.

    It would be very nice if you can give some tips on that too.

    All the best

  87. The programming techniques that was implemented on the kyanmedia site is a alot semantic. The site I reffred to is the one that is talked about on this video.
    the following are the html, css and jquery.

    jquery
    $(’#body_home #our_work li’).hover(function(){
    $(this).find(’img’).animate({top:’139px’},{queue:false,duration:500});
    }, function(){
    $(this).find(’img’).animate({top:’0px’},{queue:false,duration:500});
    });
    it affect only the front image.

    css
    #our_work li{
    list-style:none;
    float:left;
    background: #fff url(/images/bg_with_caption.png) no-repeat 0 0;
    margin:0 30px 95px 0;
    padding: 5px 7px 8px 5px;
    width:258px;
    position: relative;
    }

    #our_work li img {
    position: absolute;
    top: 0;
    left: 0;
    height: 139px;
    width: 258px;
    border: 0;
    }

    html

    Our latest work

    A new voice for illustrators

    Kyan give leading provider of online benefits a facelift

    A new online identity for a Brand Consultancy

    There is on one image per list in the html code. The second image which is a background is introduced in the css code.

    The point of this comment is that people should do their homework. You need to have a good understanding of the web dev langauge before you start learning about css or javascript frameworks. This is not meant to discredit the tutorial. I did my research to understand the concept behind the illustration.

    I do appreciate this tutorial however.

  88. Gravatar

    Mickey Hoang

    thanks a lot

  89. Loving the videos

  90. Gravatar

    Jonathan Wells

    This is absolutely amazing! This stuff is better than “Lynda.com”! On one of your sites: http://vector.tutsplus.com/ there is a drop-down menu beside the search bar. Is it possible to get a tutorial on how to do that? A client of mine wants a slide down sitemap of the entire site based on this site’s top panel: http://lancasterbaptist.org/

  91. HECK YEAH!
    Thanks for the days of learning!

  92. Loved this tutorial. Helped me understand an issue I was having where I wanted to slideUp and slideDown an element inside a div. I couldn’t get it to animate the children inside the div and I could not get it to just animate the one i clicked. I made another awkward workaround to get it to work, but using what was taught here I could make my code a bit leaner and more universal, or I guess “object oriented”

  93. Jeffrey, you are man of talent. Would you make video PHP for beginners? I am foretaste it. Privet from Russia!

  94. Gravatar

    sssss869

    Hi i’ve seen a text box n searching option in this site, http://www.stylemob.com/index.php?category=users#app=page%3D1%26category%3Dusers%26doAjax%3D1%26rand%3D999061185

    How can I di that?

  95. not sure if this is still been updated but the video for Day 8 is not loading. Anywhere I can get it?

    By the way, awesome job!

    Thanks for the tutorials.

  96. Thanks for your great series! Here’s my version of Day 8’s hover effect using a CSS sprite (combined graphic image [as Melvin suggested]) - combined with the ‘animate’ method you shared on Day 7:

    http://zornfett.com/client/themeforest/

    CSS sprites, as you all know, are handy for speedy loading of page content. Cheers!

Add a Comment

Name Email Website

Note: The avatars shown next to comments are Gravatars. You can get a Gravatar account for free and any other site that supports it will show your avatar too!

 

Trackbacks

Leave a Trackback