www.webdeveloper.com
Results 1 to 2 of 2

Thread: Multiple JavaScript Effects on One Image

Hybrid View

  1. #1
    Join Date
    Nov 2010
    Posts
    1

    Question Multiple JavaScript Effects on One Image

    Hello,

    I was trying to apply 2 javascript effects on one image. First, I use this Jquery effect (http://www.tutorialhero.com/click-55...out_effect.php) on the image. It works like it should until I put in the light box effect (this is the one I am using http://www.huddletogether.com/projec...ox2/#download). The lightbox also works, it just depends on which order I put them in the code on which one will come through.

    I am relatively new to javascript and I am learning as I go along. Below I inserted part of my code geared towards these two effects. I know I have everything else in the code correct (the body) because they work individually, just not put together (or maybe I have to put a line of code in the body to enable it to work?). Essentially, I want the image to be dulled out when the visitor opens the page, get brighter when they roll over it, then trigger the lightbox when they click on it.

    The easy option would be to use an image swap for the dull/bright mouseOver effect; however, I like the way it is done by tutorialhero.

    CODE

    <script type="text/javascript" src="javascript/lightbox/prototype.js"></script>
    <script type="text/javascript" src="javascript/lightbox/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="javascript/lightbox/lightbox.js"></script>
    <script type="text/javascript" src="javascript/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="javascript/js/custom.js"></script>
    <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />\
    <link href="css/aloft_about.css" rel="stylesheet" type="text/css" />
    <link href="css/styles.css" rel="stylesheet" type="text/css" />


    The first three scripts are for the light box and the second two are for the rollover. The style sheets are as follows- lightbox, about page layout, rollover effect. Is it possible to have both these effects on the same image?

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles