www.webdeveloper.com
Results 1 to 2 of 2

Thread: Take an action when clicking a link

  1. #1
    Join Date
    Feb 2013
    Posts
    5

    Take an action when clicking a link

    How can a do to execute a function when clicking a link?

    Something like:


    <p>Link</p>

    <script>
    $("p").click(function () {
    $(this).myFunction();
    });
    </script>


    <script> function myFunction(
    )
    </script>

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,143
    Something like this?
    http://jsfiddle.net/6VQ6r/

Thread Information

Users Browsing this Thread

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

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