• Resolved Gwentrac

    (@gwentrac)


    Hello,

    Before thank for this plugin. It’s very useful.

    I installed it and I have a problem to select a value in the list.

    When I filled my text field, the system give me the list of the expected values but when I try to select one value in the list with my mouse, the list disappear and I can selected any value.

    Do you have any idea about this problem?

    Best regards,
    Gwen

    https://www.ads-software.com/plugins/search-autocomplete/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Gabe Shackle

    (@hereswhatidid)

    Do you have any other versions of jQuery UI being loaded by either a plugin or theme? That’s typically what causes this kind of behavior.

    Thread Starter Gwentrac

    (@gwentrac)

    Hello,

    You are right. If I delete all my jQuery line of my function.php file I don’t have this problem anymore.
    In my function file, I have the following code:
    ———————————————————————
    wp_deregister_script(‘jquery’); wp_register_script(‘jquery’,”https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js”);
    wp_enqueue_script(‘jquery’);

    wp_deregister_script(‘jqueryui’);
    wp_register_script(‘jqueryui’, ‘https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js’);
    wp_enqueue_script(‘jqueryui’);
    ….
    ————————————————————————

    But the problem is that I need this loading for other element of my website!
    How can I keep my script loading and implement your plugin? Do you have an idea?

    Thanks in advance.
    Best regards.

    Gwen

    Plugin Author Gabe Shackle

    (@hereswhatidid)

    One thing to try is deregistering this script ‘jquery-ui-core’ rather than ‘jqueryui’. I don’t believe there’s actually a ‘jqueryui’ script in WP so that may be why it’s showing up multiple times.

    Thread Starter Gwentrac

    (@gwentrac)

    Hello,

    Thank for your anwser but it doesn’t work. ??

    I tried something like that:
    ———————————————————————-
    wp_deregister_script(‘jquery-ui-core’);
    wp_register_script(‘jquery-ui-core’, ‘https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js’);
    wp_enqueue_script(‘jquery-ui-core’);
    ———————————————————————-

    I forgot to tell you that this code is included in a hook in my function.php file.

    add_action( ‘wp_enqueue_scripts’, ‘insert_js_in_footer’ );
    function insert_js_in_footer(){
    ….
    }

    Your plugin is exactly what I need and it will be very nice if I could use it.

    Any other idea?

    Best regards.

    Gwen

    Plugin Author Gabe Shackle

    (@hereswhatidid)

    Do you have a link I can view this at?

    Hi all,

    Is there already a solution for this? I’m having the same problem. The search suggestions are unreachable.
    ul.ui-autocomplete changes from display: block; into display: none; after trying to select the suggestions.

    This occurred after adding the jquery range-slider
    https://jqueryui.com/resources/demos/slider/range.html

    The range slider only needs one extra (inline) script like

    <script>
    	$(function() {
    		$( "#slider-range" ).slider({
    			range: true,
    			min: 0,
    			max: 500,
    			values: [ 75, 300 ],
    			slide: function( event, ui ) {
    				$( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
    			}
    		});
    		$( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
    			" - $" + $( "#slider-range" ).slider( "values", 1 ) );
    	});
    	</script>

    But the two shares css classes

    Range slider e.g.:
    <div id="slider-range" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" aria-disabled="false"><div class="ui-slider-range ui-widget-header ui-corner-all" style="left: 10%; width: 80%;"></div><a class="ui-slider-handle ui-state-default ui-corner-all" href="#" style="left: 10%;"></a><a class="ui-slider-handle ui-state-default ui-corner-all" href="#" style="left: 90%;"></a></div>

    Kind regards,
    Rian

    Hi,

    Found what was wrong:
    I loaded the jquery-ui wrong, in the header via the Genesis theme options
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

    after adding it in my theme’s php like
    wp_enqueue_script('jquery-ui', '//code.jquery.com/ui/1.10.4/jquery-ui.js', array('jquery'), '1.10.4', true);
    it worked.

    Plugin Author Gabe Shackle

    (@hereswhatidid)

    Glad to hear!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Problem to select result in the autocompletion list’ is closed to new replies.