This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

regarding autopopular on click

Home Forums Product Support Forums Ajax Search Pro for WordPress Support regarding autopopular on click

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #44552
    davidwong22davidwong22
    Participant

    Hi!
    Thanks for awesome plugin 🙂
    I need some help and wonder if you can help.

    Question 1:
    It is regarding the “auto populate” function.
    So far it appears below search bar automatically but is there a way to make it appear on click instead?
    Instead of auto populate popping out automatically, I want it to popup on click on search bar. Is there a function or code I can use for that?

    Question 2:
    Is it possible to add icon in front of search result?

    Please refer to the image.

    Any result is greatly appreciated.

    Thank you and have a wonderful week ahead! 🙂

    #44558
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Thank you for the kind words!

    1. Theoretically possible, but only via custom coding and the autopopulate must be disabled. You can try the code below, but I can’t promise it will work in every case as it should:

    add_action('wp_footer', 'asp_add_footer_script', 99999);
    function asp_add_footer_script() {
    	?>
    	<script>
    	jQuery(function($){
    		jQuery('input.orig').one('click', function(){
    			ASP.api(jQuery(this).closest('.asp_m').data('id'), 
    					jQuery(this).closest('.asp_m').data('instance'),
    					'searchFor', '');
    		});
    	});
    	</script>
    	<?php
    }

    2. If you have a HTML code ready for the icon, then you could use the advanced title/content fields feature. It supports HTML, so you could add the icon to the title or the content fields.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.