I have a question regarding my jquery mobile application. I am trying to implement a hover effect on items with the class grid-item, where the width and height change simultaneously in an animation. Here is the code snippet I am using:
$('.grid-item').hover(function(){
$(this).animate({
"width" : "200px",
"height": "200px"
}, "fast");
}, function(){
$(this).animate({
"width" : "100px",
"height": "100px"
}, "fast");
});
The issue I am facing is that when I test it, the height changes quickly first, and then the width changes slowly to 200px once the height reaches its target value. I want both the width and height to change simultaneously and quickly.
If anyone has any insights into what might be causing this problem or how to resolve it, I would greatly appreciate your input.
Thank you!