Posts marked with "Mouse" in tags

Scroll Horizontally Without Scrollbar Using jQuery

To scroll horizontally with CSS is very annoying, because the whole page will move vertically and sometimes the Y axis will scroll. So I decided to use jQuery and it’s very simple. Only 237 characters which is only 2 lines. Here is the **jQuery **code with the div id #scrollho. jQuery $('#scrollho').on('mousewheel',function(e){ e.preventDefault(); scrollLeft=$('#scrollho').scrollLeft(); if(e.originalEvent.wheelDeltaY.toString().slice(0,1)=='-'){ $('#scrollho').scrollLeft(scrollLeft+100); }else{ $('#scrollho').scrollLeft(scrollLeft-100); } }); CSS #scrollho{ overflow:hidden; } Explanation The #scrollho div’s scrollbars are hidden with CSS.... [READ MORE]

How to check if the mouse is over an element in jQuery?

Here is a simple plugin to check if the mouse is over an element in JQuery. Open your jQuery source file and search for window.jQuery = window.$ = jQuery; Paste the code shown below after the code you have just found. <span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> $</span><span class="pun" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="pln" style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"... [READ MORE]

Follow/Subscribe

Telegram 

Mastodon  Twitter

GitHub GitLab

Subdomains

Demos  Lab

Past

This blog was once on WordPress. Now a static site. See source code on

GitLab