Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a very wierd problem, maybe very easy to fix for any of u, but im struggling with it for days now.

I have a live search in my plugin, that works fine when i directly fire the function ( $this->function() ), but returns a 0 when i put it in a shortcode.

Is there any communication that has to be changed? I've tested a alert and it reached the Ajax/jquery code.

Hope someone can help me out!

$(".search").keyup(function() { 
var searchid = $(this).val();
var dataString = 'search='+ searchid;
    type: "POST",
    url: ajaxurl,
    data: dataString,
    cache: false,
    success: function(html)
} return false;    

    var $clicked = $(e.target);
    var $name = $clicked.find('.name').html();
    var decoded = $("<div/>").html($name).text();
jQuery(document).live("click", function(e) { 
    var $clicked = $(e.target);
    if (! $clicked.hasClass("search")){
share|improve this question

marked as duplicate by Pieter Goosen, ialocin, toscho Jul 12 '14 at 1:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.