Plugin Author
TC.K
(@wp_dummy)
Do you mean js script inside the searched results?
Better show your codes here.
If it is js script chances the script is not binding to the ajax added DOM div, and you will need to use even delegation method.
This is the code i have in functions.php add_filter(‘uwpqsf_result_tempt’, ‘customize_output’, ”, 4);
function customize_output($results , $arg, $id, $getdata ){
// The Query
$apiclass = new uwpqsfprocess();
$query = new WP_Query( $arg );
ob_start(); $result = ”;
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();global $post;
echo ”.the_content().”;
}
echo $apiclass->ajax_pagination($arg[‘paged’],$query->max_num_pages, 4, $id, $getdata);
} else {
echo ‘no post found’;
}
/* Restore original Post Data */
wp_reset_postdata();
$results = ob_get_clean();
return $results;
}
And this is the script i want to load in results <script src=”http://tooltip.lolbuilder.net/v/0.1.1/release/loltip.min.js”></script>
Its already in the head of my theme but when i search and the image appears it doesnt have a tooltip like the rest of the post
Plugin Author
TC.K
(@wp_dummy)
Well, this is because the lotip.min.js is wrote in a way that not support dynamic DOM (Ajax), like I said on my last reply.
Also, I don’t know how you bind the image to the toltp js, seem you haven’t changed anything in the function.
You can try load the script on the result load. eg:
function customize_output($results , $arg, $id, $getdata ){
echo '<script src="http://tooltip.lolbuilder.net/v/0.1.1/release/loltip.min.js"></script>';
// The Query
$apiclass = new uwpqsfprocess();
$query = new WP_Query( $arg );
ob_start(); $result = '';
// The Loop
....etc