+1  A: 

would this give you more of what you want?

also, make sure you're including the jquery library somewhere above this.

$(document).ready(function() {
    $('.ui-button').hover(function() {
        $(this).addClass("ui-state-hover");
    },
                function() {
                    $(this).removeClass("ui-state-hover");
                }
        ).mousedown(function() {
            $(this).addClass("ui-state-active");
        })
        .mouseup(function() {
            $(this).removeClass("ui-state-active");
        });
});
John Boker
+3  A: 

Try changing your code to this....

$(document).ready(function() {
    //SELECT THE .ui-button CLASS INSTEAD OF this
    $('.ui-button').hover(function() {
        $(this).addClass("ui-state-hover");
    },
                function() {
                    $(this).removeClass("ui-state-hover");
                }
        ).mousedown(function() {
            $(this).addClass("ui-state-active");
        })
        .mouseup(function() {
            $(this).removeClass("ui-state-active");
        });
});

I do not believe that "this" has the context that you were targeting when you use this line of code...

$(this).hover(function() {

Try replacing the line above with the following...

$('.ui-button').hover(function() {
RSolberg
I had used "ui-button" in the past but I used double quotes rather then single quotes! also i had the above JavaScript code above my jquery declarations, also thank you for the prompt response
Geovani Martinez
double quotes would work too, the key here is the . on ".ui-button"
John Boker
+1  A: 

In your current code snippet, $(this) is referring to $(document). Try this:

$(document).ready(function() {  
    $('.ui-button').hover(function() {  
        $(this).addClass("ui-state-hover");  
    }, <rest of code omitted>
}

Now $(this) is referring to $('.ui-button'), which is what you want.

BStruthers