target="_blank" modification cannot take effect.

Home Forums Product Support Forums Ajax Search Pro for WordPress Support target="_blank" modification cannot take effect.

This topic contains 5 replies, has 2 voices, and was last updated by YUANFAN YUANFAN 4 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #39450
    YUANFAN
    YUANFAN
    Participant

    I modified the code in the browser, target=”_blank” was changed to target=”iframe_2″
    But no change.

    • This topic was modified 4 months, 2 weeks ago by YUANFAN YUANFAN.
    • This topic was modified 4 months, 2 weeks ago by YUANFAN YUANFAN.
    • This topic was modified 4 months, 2 weeks ago by YUANFAN YUANFAN.
    Attachments:
    You must be logged in to view attached files.
    #39456
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Try to turn off this option, it may help: https://i.imgur.com/IKvXCZ4.png

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #39458
    YUANFAN
    YUANFAN
    Participant

    Tried it, nothing works. The problem still exists.

    #39461
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Okay, let’s try it programmatically then via a custom code.

    Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.

    add_action('wp_footer', 'asp_add_footer_script', 99999);
    function asp_add_footer_script() {
    	?>
    	<script>
    	(function($){
    		$(".asp_m").on("asp_results_show", function() { 
    			setTimeout(function(){
    				$('.asp_r .item').off();
    				$(this).find('.asp_res_url').off();
    				$('.asp_r .item').on('click', function(e){
    					$(this).find('.asp_res_url').get(0).click();
    				});
    			}, 100);
    		});
    	})(WPD.dom)
    	</script>
    	<?php
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #39462
    YUANFAN
    YUANFAN
    Participant

    After the code is added, clicking on the link will not cause any jumps.

    #39464
    YUANFAN
    YUANFAN
    Participant

    It worked, thanks a lot.

    • This reply was modified 4 months, 2 weeks ago by YUANFAN YUANFAN.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.