Add Fade effect for ajax loading content in WordPress

In wordpress site while you add ajax function to modify html content you can do it in fancy way like adding some jquery effect. so user can see updated contents in site.

<script type="text/javascript">
jQuery(document).ready(function() {
    jQuery('.ajaxlink').click(function(e) {
        var postid = jQuery(this).data('postid');
            type: 'POST',
            url: "",
            data: {
                action: 'action_show-post-extra-content',
                postid: postid
            success: function(data) {
	        //show ajax output with fade effect

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s