Side panel -> change click to hover.
Welcome!
I have a script on the sliding side panel:
-
- $(document).ready( function() {
- $(".slide_button").hover(function () {
- xx = $(this).attr('class');
- if (xx=='slide_button') {
- $("#my-panel").animate({
- left: "0px"
- }, 500);
- } else {
- $("#my-panel").animate({
- left: "-220px"
- }, 500);
- }
- $(".slide_button").toggleClass("cls");
- });
- });
It opens when you click the button, and I would like that this action was you hover over it (hover), how can I get one?
I tried
.click replace to
.hover, but then I still setting forth and hid.