Search functionality is crucial to improve the user experience, making navigation on the website much easier. This functionality is built into WordPress and almost every other CMS, but in this article I’m going to present a custom and very lightweight HTML-CSS-JS-jQuery solution that is very easy to implement.
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.
Popup boxes are the most useful way of showing a warning or any other important information to the website visitors in many HTML5 templates. In this article I’m going to walk you through the creation of a very simple popup box with shadow overlay and close button. We’re going to implement this using HTML, CSS and jQuery in less than 100 lines (not compressed code).
In this article I’m going to present two workarounds to replace the getElementByClass JS function, with or without using jQuery.
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.
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.
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.