Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7001235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:46:38+00:00 2026-05-27T20:46:38+00:00

I am using jqueryui autocomplete and have set up a search of an image

  • 0

I am using jqueryui autocomplete and have set up a search of an image gallery using ContentFlow that when the image is found, a small icon is shown and the user can open the image with a lightbox (prettyphoto )

Here is the code:

$(function() {
    var projects = [
        {
            value: "Alcatraz",
            label: "Alcatraz",          
            icon: "Alcatraz.jpg",
            url: "slides/Alcatraz.jpg",
            desc: "",
            imgN: "1"
        },
        {
            value: "Amber Light",
            label: "Amber Light",           
            icon: "Amber Light.jpg",
            url: "slides/Amber%20Light.jpg",
            desc: "",
            imgN: "2"
        },
        {
            value: "Blue Boat",
            label: "Blue Boat",         
            icon: "Blue Boat.jpg",
            url: "slides/Blue%20Boat.jpg",
            desc: "",
            imgN: "3"
        }
    ];

    $( "#project" ).autocomplete({
        minLength: 0,
        source: projects,
        focus: function( event, ui ) {
            $( "#project" ).val( ui.item.label );
            return false;
        },
        select: function( event, ui ) {
            $( "#project" ).val( ui.item.label );
            $( "#project-id" ).val( ui.item.value );                
            $( "#project-icon" ).attr( "src", "thumbs/" + ui.item.icon );
            $( "#project-description" ).html( ui.item.desc );
            $( "#project-label" ).html( ui.item.label );
            $( "#project-link" ).attr("href", ui.item.url );
            $( "#project-link" ).attr("title", ui.item.label );
            return false;
        },

        close: function() {
            var value = $( "#project" ).val( ui.item.imgN );
            cf.moveTo(value);
        }
    })
    .data( "autocomplete" )._renderItem = function( ul, item ) {
        return $( "<li></li>" )
            .data( "item.autocomplete", item )
            .append( "<a>" + item.label + " - " + item.desc + "</a>" )

            .appendTo( ul );
    };

});

The HTML:

<div id="project-label">Search</div>
<a href="#" rel="prettyPhoto" class="" id="project-link"><img id="project-icon" src="res/transparent_1x1.png"/></a>
<input id="project"/>
<input type="hidden" id="project-id"/>
<p id="project-label"></p>
<p id="project-description"></p>

The problem I am having is with the following function:

close: function() {
            var value = $( "#project" ).val( ui.item.imgN );
            cf.moveTo(value);
        }

I need the image gallery to scroll to the specific image in the contentflow using

 cf.moveTo();

I am not getting my code to return this value. Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:46:39+00:00Added an answer on May 27, 2026 at 8:46 pm

    After trials and tribulations, I found a way to get this to work with this additional modified code:

            select: function( event, ui ) {
    
                $( "#project-imgN" ).val( ui.item.imgN );
    
    
                return false;
            },
    
            close: function(event, ui ) {
            function runEffect() {
            // get effect type from 
            var move = $( "#project-imgN" ).val();
    
            // run the effect
            cf.moveTo(move);
        };
    
         runEffect(); 
            }
        })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the jqueryui autocomplete to have my textbox appear with various options for
I am using jQuery UI Autocomplete to build a search interface. I have defined
I'm using jQuery 1.4.4 and jQuery UI 1.8.9. I have an autocomplete field that
I'm using the jqueryUI autocomplete widget on my site. Say i have the following
When using a jQueryUI AutoComplete with AutoFocus set to true, if you type too
I'm using the jQueryUI autocomplete() function and I can't figure out how to have
I am using the jQuery autocomplete (http://jqueryui.com/demos/autocomplete/) and have it working but when a
Using the JQuery autocomplete I have a function that produces an Array of friends
I have jQuery Autocomplete (not jQueryUI) to search for fname and lname in my
What I want to do is have categorised results using autocomplete through jQueryUI's function.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.