ajax

prettyPhoto Live Event with ajax loaded content

By Kannan Damodharan | 0 Comments

Prettyphoto is a wonderfull gallery plugin but when used with ajax loaded content it didn’t work with newly loaded images from ajax request into the dom. Even though there are many solutions posted in internet none seem to work as expected. So after playing around a while i found a simple trick Include jQuery(“a[rel^=’prettyPhoto’]”).prettyPhoto({}); or…

Read More

Bootstrap Ajax model popup not working

By Kannan Damodharan | 0 Comments

For some reasons the bootstrap model box was not loading ajax content. I was trying this is wordpress and having a hard time fixing the issue. With some research i found the solution. The code was working perfectly fine but the data didn’t refresh for some reasons. So added a bootstrap jquery snippet.

Read More

Wp ajax call returns 0 at the end

By Kannan Damodharan | 0 Comments

To any wp ajax call add_action(‘wp_ajax_my_action’, ‘my_action_callback’); function my_action_callback() { //Do action // echo ‘My ajax action’; die(); } Don’t forget to add the die() at the end of ajax function to avoid 0 with the results.

Read More