You might have come across situations when the jQuery click event listener works fine on desktop but it doesn’t fire on mobiles, tablets and other touch devices. This might happen when the event is not attached to an anchor tag but to some other element, like a div. There is a very simple solution to fix this issue.
Continue reading “Fix When jQuery Click Event Is Not Working On Touch Devices”
We can improve the user experience highlighting the active menu item on our websites. This makes navigation easier because the visitor will know at the first glance which is the current page.
This strategy also increases the amount of visited pages because the visitor will more likely click the next page when it’s easier to find that.
Continue reading “Highlight Active Menu Item With jQuery Script”
In this article I’m going to present a lightweight script to stick an HTML element to the top of the page when the user scrolls through it. Use this to make a menu, a call to action button or any other important element always stay in focus. Adjusting the script you can trigger other effects when the page scrolls through an anchor point. Here are the HTML CSS and JS codes to use to accomplish this effect.
Continue reading “Script to stick HTML element to the top when scrolled through”
Using the name attribute of the anchor tag has become obsolete so we have to find a new way to scroll to a certain point on the page when a link is being clicked. We want to do this animated, not just an instant jump to the target position.
Continue reading “Animated scroll to anchor/id function with jQuery”
Probably you experienced some flashing effect the first time you tried to make a jQuery hover animation without the stop() call. This happens when you hover and take your mouse away quickly without waiting for the animation to finish. This behavior triggers a new animation to start before the previous has finished.
In this article I’m going to present the proper way of making jQuery animation calling the stop() method, avoiding shaking fuzzy effects.
Continue reading “jQuery Hover Animation Effect Without Jumping – Using Stop() Method”
We know there are many pointless, dumb laws out there that make no sense. The European Cookie Law is also annoying because you have to start by closing a popup every single time you visit a website. This law is a privacy legislation that requires sites to get consent from visitors to store or retrieve any information about them.
Continue reading “Cookie Consent warning strap with HTML-CSS-JS”
Copying a text from a website can be uncomfortable. Help your site visitors select the text with a single click of a mouse button with this simple trick.
Continue reading “Select Div Content With a Single Click”
Improve your website’s user experience with a very simple arrow which fades in when visitors start scrolling the page. The page smoothly scrolls back to top when the the button is clicked.
Continue reading “Scroll Back to Top Widget”
We are presenting a simple jQuery solution to implement social media share buttons for the current page, with svg icons. Our example includes the most popular sites: Facebook, Twitter, Google+, StumbleUpon, LinkedIn, Digg, Blogger, Reddit, Delicious and “email to friend”. You can add new sites tweaking the code a little.
Continue reading “Social Media Share Widget”
If you just simply publish an email address on a website you can expect tons of spam in the inbox. Web spiders crawl the sites all the time looking to collect email addresses to send them spams, ads or viruses. This is why you have to make sure you never add your email to any website as plain text or link which is visible by robots.
Continue reading “Prevent web crawlers from stealing email addresses from your website”