範例如下:
$('#divID').css("background-image", "url(/myimage.jpg)");
$('#divID').click(function()
{
// do my image switching logic here.
});
$('#divID').mouseover(function()
{
// do my image switching logic here.
});
$('#divID').mouseout(function()
{
// do my image switching logic here.
});
沒有留言:
張貼留言