Jquery switches the sample code of different images
There are many ways to switch between different images. This article introduces how jquery is used.
The Code is as follows:
# Sidebar div # live_chat {
Background: url ("scroll/live_chat1.jpg ");
Height: 76px;
}
# Sidebar div # live_chat a: hover {
Background: url ("scroll/live_chat2.jpg ");
}
# Sidebar div # customer_survey {
Background: url ("scroll/survey1.jpg ");
Height: 75px;
}
# Sidebar div # customer_survey a: hover {
Background: url ("scroll/survey2.jpg ");
}
# Sidebar div # newsletter_sign {
Background: url ("scroll/newsletter_sign_bg.jpg ");
Height: 76px;
}
# Sidebar div # newsletter_sign a: hover {
Background: url ("scroll/newsletter_sign_bg1.jpg ");
Height: 76px;
}
# Sidebar div # back_top {
Background: url ("scroll/back_top1.jpg ");
Height: 40px;
}
# Sidebar div # back_top a: hover {
Background: url ("scroll/back_top2.jpg ");
}
# Sidebar div {
Cursor: pointer;
Display: block;
Width: 77px;
}