Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By Vapr_Arts

Thread: What would be the best way of doing this? (Filtering HTML Objects using a search box)

  1. #1
    Junior Member
    Join Date
    Jul 2015
    Posts
    1
    Member #
    50791

    Question What would be the best way of doing this? (Filtering HTML Objects using a search box)

    Hello,

    First post here, so I'll try and keep it simplistic and informative.

    Basically I'm building a website, and have a "Filter by Keywords box"

    Here you can see both the search box in Blue, and the corresponding HTML objects in red.

    So what I want to achieve is when a user enters "F" into the box, I want it so the HTML objects in Red only show if they have "F" in the title - Similar to an autocomplete field.

    My way would be having all of the different fields in a database, and using it similarly to an autocomplete field. However I feel this would have too many queries to the database, and I feel there would be a better way of doing it.

    The HTML for these objects is:

    <div class="col-md-3 col-sm-4 col-xs-6">
    <div class="category-item">

    <a href="search-result.html"><i class="fa fa-book"></i>Book</a>
    </div>

    </div>

    Thanks for reading!

  2.  

  3. #2
    Senior Member timbo89's Avatar
    Join Date
    May 2015
    Location
    Adelaide, South Australia
    Posts
    126
    Member #
    49722
    Liked
    26 times
    I'd like to see if there is a html solution to this. As far as i know, the only way to accomplish this would be to use a database.

  4. #3
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    So I'm trying to work on something like this using html,css, and jquery for a image gallery im creating. Im using the data- attribute to target specific photos.

    Im not sure how compatible it is with devices and browsers as i just started getting to it but you are more than welcome to try it yourself.


    Sent from my iPhone using Tapatalk
    timbo89 likes this.

  5. #4
    Senior Member timbo89's Avatar
    Join Date
    May 2015
    Location
    Adelaide, South Australia
    Posts
    126
    Member #
    49722
    Liked
    26 times
    awesome idea Vapr_Arts, i've only recently started messing around with jquerey but that should work... the only down side would be loading times if it's a large list that is going to be filtered.

    i found this with a quick googling jquery: hide/show based on variable for class name - Stack Overflow

  6. #5
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    Yea the list im using is small. Theres 4 artists and each have about 15 images. Its just a fun project i have and wont make that live unless i can have it all working right. Right now there is no filtering options on the gallery and im still not sure if ill ever make it live.


    Sent from my iPhone using Tapatalk


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Tags for this Thread

All times are GMT -6. The time now is 10:42 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com