SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    685
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is the function called that....

    What is the function called that when you hover over a link, it changes the text in a certain part of the website?


    What is the function called that when you click a link, it changes the text in a certain part of the website?

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    You are wanting to capture events and call some function.

    You can use event handlers like onmouseover and onclick to capture those events.
    Or you can setup event listeners on the mouseover or click events for an element.

    The easiest way is to whack an inline event handler in the page.
    Code:
    <script type="text/javascript">
    <!--
    
    function pClicked() {
      alert("You clicked on the paragraph");
    }
    
    //-->
    </script>
    Code:
    <p onclick="pClicked">Click Me</p>
    But the event listeners are more powerful and better, because they separate the content from the behaviour.

    Hope it helps

  3. #3
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    685
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think this is what I'm looking for... I'm talking about something like the text on innatemediagroup.com

  4. #4
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Please be more specific, are you talking about the menu?
    Edit: That site is completely unusable without javascript.

    I'm guessing you're referring to the portfolio where you click on the link and it updates parts of the page. This is Ajax and it's not straight forward.

  5. #5
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    685
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes them side menu when you click a service, it just shows different text


Bookmarks

Posting Permissions

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