Skip navigation
Currently Being Moderated

Getting closer in Jquery

Jun 22, 2012 3:42 PM

Tags: #help #jquery #mac #dreamweaver

I've made some progress in updating my site with Jquery thanks to you here. 

 

The fade action is much better but I've been trying to change the trigger to some text and to use a click rather than a mouseover.

 

I've got the click working but I can't seem to stop the image from triggering the fade as well as the text.   http://dinghydogs.com  The text is in the middle and says "Click to swap styles."

 

Sorry for being such a pain.

 
Replies
  • Currently Being Moderated
    Jun 23, 2012 4:22 AM   in reply to harvey waxman

    Add the highlighted

    $("#fade span").click(function(){

        $("#taper").animate({

         opacity: 1,

         opacity: 'toggle'

      }, 500, function() {

        });

    });

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 23, 2012 5:36 AM   in reply to harvey waxman

    You will find subtle information regarding the element selectors. The reason I added span is because the span element falls within a div with an ID of fade as in

    <div id="fade"><span>text</span></div>

    We could have given the span element and ID e.g. <span id="myText">. In which case the element selector would have looked like

    $("#myText")

    I hope this helps.

     

    Gramps

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points