thumbsup and thumbs down just like yahoo answers

Hi..

i was looking yesterday at yahoo answers and they had a very nice option of giving the votes of yes/no using the thumbsup and thumbs down.

i checked it and it is like with the use of jquery (NICE)

how it can be achieved and stopping the user from doing it again and again for the same answer.

i know this can be done but as a noob in jquery this has some troubled me a lot
LVL 16
Gurpreet Singh RandhawaWeb DeveloperAsked:
Who is Participating?
 
Lukasz ChmielewskiCommented:
0
 
rajeeshmcaCommented:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" src="scripts/jquery.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
                $("h2.trigger").toggle(function(){
                        $('#imageToggle').attr('src','images/thumbsdown.jpg');
                        }, function () {
                        $('#imageToggle').attr('src','images/thumbsup.jpg');
                });
        });

    </script>
</head>
<body>
    <form id="form1" runat="server">
        <h2 class="trigger">
            <img src="images/thumbsup.jpg" alt="Your selection" id="imageToggle"/></h2>
    </form>
</body>
</html>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.