I'm not sure what you're asking...The most obvious button on Jyte is
the Green/Red thumbs up/thumbs down button, which changes when the
user hovers his mouse over it.  So if you're asking how do you make
the color change from grey to green or grey to red, you could use
hover and addclass:

$("div.mybutton span")
     .hover(
          function(){$(this).addClass("activated")}
     ,
          function(){$(this).addClass("greyed")}
     )

If that's sort of what you want, then look over this:
http://www.learningjquery.com/2007/02/quick-tip-set-hover-class-for-anything

You may also want to look at hoverIntent, which has a timer function.
That allows the user to travel over an element without triggering it.
Hover triggers immediately when the mouse goes over it.

Does this help?



On Jul 6, 5:55 pm, inVINCable <[EMAIL PROTECTED]> wrote:
> Sorry guys, but I cannot get my head around this one. I am trying to
> create a vote button that looks like the ones here, jyte.com
>
> I already have ALL of the backend logic programmed. I even already
> have everything working, the problem is, I am using CSS to display the
> buttons. This does not allow me to resize the button on a MOUSEOVER
> state like I was told javascript was able to do. I know there is a
> mouseover function in jquery, but I am confused about what I should
> do, display an image or what? And how to go about doing that. Here is
> what my javascript looks like atm, using css.
>
> $(document).ready(function(){
>         $("div.mybutton span").html($currentvote);
>         $("div.disagree span").html($disagree);
>         $(".mybutton span").click(function(){
>
>                 $("div.mybutton span").load("/stories/vote/" + $idof);
>
>         });
>
>         $('.disagree span').click(function(){
>
>                 $("div.disagree span").load("/stories/disagree/" + $idof)
>         });
>
> });
>
> Maybe someone knows a way to do what I want, I'm really quite lost
> here so any advice would be GREATLY appreciated. Thank you.

Reply via email to