Code

Discussion on Simple Content Search

Discussion on Simple Content Search

Cart 182 sales

xxcriversxx supports this item

Supported

This author's response time can be up to 1 business day.

30 comments found.

The plugin works great with small amounts of information, but I have a list of names being pulled from a database that loads 500 + rows of information on average. Anytime i try to search this large list, the page load either takes a long time, or just crashes the page.

I though maybe if I could searchItem by class too, that would help take some time off the load, since I would only be searching 1 of 9 tds, as appose to all 9, of 500+ tr’s. Any thoughts?

trobbins23,

I see your dilemma, can you send me a link so i can better assist?

xxcriversxx

This seems great. However, it seems very ‘exact-searching-only’, like when I type f.i. ‘Intro IDA ’ it doesn’t give the result but when I typd ‘Intro to IDA ’ it does. How easy is it to make it so that it would work with separate keywords?

Other than that, this seems absolutely great but for my needs it really needs to work with separate keywords.

Thanks!

Now is working! Thanks anyway!

Hi! I have a problem making the script search through my markup, and it’s very annoying. Could you please take a look at my JSFIDDLE maybe you can figure out what’s wrong. Thank you!

great little plugin, I have it working and set it up so it only displays the result of the search. I set the search list to hide to achieve this. However I now have an issue where I need the function to run only when the input reaches a certain amount of characters. This would prevent unnecessary results from showing prematurely. Is there a way to do this?

grs,

As it is now, it runs on the “keyup” event so no. But you can feather this by doing a return false.

    $("my-input").keyup(function(){
        // If the input has less than 7 characters, do nothing...
        if( $(this).val() < "7" ){
            return false;
        }
    });

Cheers, xxcriversxx

anybody here!?

Hello! Good job! I’m trying to put this on my website and it’s not working proper. The idea is that I want to use this search system for images, you will understand what is my approach by taking a look on the website. I think something is wrong but I don’t know exactly what. Here is my code: http://jsfiddle.net/dynamyc/7Rm8U/

and this is the live website link: http://whiteandgold.ro/realty/ Please help me with some suggestions. Thanks!

HI really cool plugin, I having issues getting it to work tho. Here is my mark up. <input type="text" class="searchFilter" onblur="if(this.value == '')this.value='Keyword(s)'" onfocus="this.value==this.defaultValue?this.value='':null" value="Keyword(s)" name="keyword"> <div id="container" class="searchable"> <ul id="boxy" class="grid"> <li><a href="#"><img src="" alt="" height="45" width="90" />PCAN-USB</a></li> <li><a href="#"><img src="" alt="PCAN-USB" height="45" width="90" />PCAN-USB Pro</a></li> <li><a href="#"><img src="" alt="" height="45" width="90" />PCAN-USB Hub</a></li> </ul> </div>

And plugin call back:

$(document).ready(function(){ $('.searchFilter').simpleContentSearch({ 'hover' : 'searchBoxHover', 'active' : 'searchBoxActive', 'normal' : 'searchBoxNormal', 'searchList' : 'searchable ul', 'searchItem' : 'a', 'effect' : 'fade' });

I have been trying for 2hrs now switching stuff around like: searchList: searchable (or seachable ul), searchItem: li (or a) to no avail. Was having problems even getting the demo file to search for p’s instead table stuff. Wasn’t working 100%.

Any help is appreciated.

tonytupperware,

Your markup looks fine. Could you perhaps send me a link to your dev site so i run it through the debugger?

crivers

I have just bought the plugin and I wish to know something. Is it possible to launch a search with 2 keywords? When I try , it doesn’t work.

William

Hello,

To answer your question, you can have as many keywords as you’d like. The plugin was written in a way that simplifies your plugin interface.

The only syntax you need to follow is to set the “searchList” option to an element’s classname (e.g. “container”). And you have to set the “searchItem” option to an element (e.g. “p” ).

For example:

HTML
<div class="container">
        <div class="hero-unit">
            <h1>Simple Content Search</h1>
            <p>
                This plugin uses regular expression to sort content, in real-time, base on your search input. Simply activate the plugin 
                and everything else is taken care of for you. Below is a brief demo showing you how to use this plugin as well as detailed 
                list of some of its features.
            </p>
            <p>
                This plugin uses regular expression to sort content, in real-time, base on your search input. Simply activate the plugin 
                and everything else is taken care of for you. Below is a brief demo showing you how to use this plugin as well as detailed 
                list of some of its features.
            </p>
            <p>
                This plugin uses regular expression to sort content, in real-time, base on your search input. Simply activate the plugin 
                and everything else is taken care of for you. Below is a brief demo showing you how to use this plugin as well as detailed 
                list of some of its features.
            </p>
            <p>
                This plugin uses regular expression to sort content, in real-time, base on your search input. Simply activate the plugin 
                and everything else is taken care of for you. Below is a brief demo showing you how to use this plugin as well as detailed 
                list of some of its features.
            </p>
            <p>
                This plugin uses regular expression to sort content, in real-time, base on your search input. Simply activate the plugin 
                and everything else is taken care of for you. Below is a brief demo showing you how to use this plugin as well as detailed 
                list of some of its features.
            </p>
            <p>
                This plugin uses regular expression to sort content, in real-time, base on your search input. Simply activate the plugin 
                and everything else is taken care of for you. Below is a brief demo showing you how to use this plugin as well as detailed 
                list of some of its features.
            </p>
        </div>
        </div>
Javascript
$(document).ready(function(){
    $('.searchFilter').simpleContentSearch({
        'active'    : 'searchBoxActive',
        'normal'    : 'searchBoxNormal',
        'searchList' : 'container',
        'searchItem' : 'p',
    });
});

Interesting approach. I might use it in a project someday. Does it only search the curretn page? I mean, what if you use pagination for your content, like a big list with a number of pages? Does it search only the current page, or the complete list?

This plugin is written to search content that is currently loaded on the page. Thats not to say it cant search content that is loaded in via ajax.

If I were to do that, I would hook the ajax on the search “keyup” event. That would allow you to do realtime searching on the fly. Excellent idea! That would make for some pretty inventive UI. I hope this helps.

xxcriversxx

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey