Fix When jQuery Click Event Is Not Working On Touch Devices

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”

jQuery Hover Animation Effect Without Jumping – Using Stop() Method

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”

Show a PopUp to Abandoning Visitors

Try to convince your abandoning visitors to stay on your page and turn them into customers with a simple trick: show them a popup asking them to subscribe to a newsletter, to like/share the page, present some hot deals, related articles, ads or anything that might make them convert. In this article I’m sharing with you the very simple JavaScript code to make this working.
I know popups are considered to be annoying, pushy and people hate them but in this case we’re talking about visitors who have already decided to leave your site so you have nothing to lose by nagging them a little.

Live demo

how to solve a Rubik's Cube
Continue reading “Show a PopUp to Abandoning Visitors”

Save JavaScript variables to PHP/MySQL DataBase Securely with Ajax Post

We will show you the way how to save JavaScript variables to a PHP/MySQL DataBase easily and securely. In my demonstration we’ll go through an example in which we want to store an array for my users. The users can be identified by their unique names.

Log in to to your cPanel hosting, find the “MySQL Databases” in the menu and create a new database. Create a user and add it to the database, checking all privileges. We’ll use this user to connect to the DB.

Open phpMyAdmin and you should see the new DB in the list. Select it and make a new table. In my example I’ll call it usertimes.
Set to auto increment (A_I) the primary key and make sure the name field is a unique value. We’ll store the current save date and the rest of the variables depends on your specifications. Save the settings when it’s done. My database is ready to receive input.

JavaScript variables to PHP MySQL DataBase Continue reading “Save JavaScript variables to PHP/MySQL DataBase Securely with Ajax Post”