In the previous part of this tutorial we covered technique to implement AJAX login in sidebar without a plugin in WordPress. In this part two we will continue with AJAX logout.

After a successful login, login form gets disappear and AJAX loads user’s display name and a link to logout on the same page. Now we need to apply some functionality to show the same and keeping the login form hidden on page refresh or redirect.

Read More

Sometimes we need to check the existence of a character or sub-string into a string or find the position of a character or sub-string into a string. Javascript provide us a very simple method :

Read More

Sometimes we need to resize colorbox after clicking on sumbit button and we want to show some error or success messages on the same popup window by using javascript or ajax

Read More

The power of jQuery offers many features to web developers. jQuery has addClass(), removeClass() and toggleClass() methods to change class.

//Add a class
$('#element').addClass('class_name');

//Remove a class
$('#element').removeClass('class_name');

//Remove old class and add new class
$('#element').removeClass('old_class').addClass('new_class');

//Or a short way to swap classes
$("#element").toggleClass('old_class new_class');

Read More

There are several ways to redirect a user from one URL to another. There might be several reasons to do this. I am describing different ways to redirect a URL or page quickly and seamlessly including redirect URL using JavaScript, use a meta tag, redirect using an htaccess file, redirection using PHP and finally redirect URL in WordPress.

Read More

[ Page 9 of 10 ]