Added: 2 months ago
From: optikalefxx
Views: 1,569
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (17)

Sign In or Sign Up now to post a comment!
  • Cool. How about highlighting what you typed within the search result text?

  • this is retarded. you should be searching a values in a javascript array.

  • @kriogenx0 Although your comment was kind of asshole-like. You have a good point. But I would have to have unique IDs on all the elements, and store those in the array so they can be immediately targeted.

  • @optikalefxx Why would you need unique ids? It'd be best to parse all the DOM elements into an array of objects, or array of values. Then search that. You would cache that array for future searches as well, in case the user changes that search.

  • @kriogenx0 Sure you could cache each of the DOM elements in the array, but that means you still have to loop through the UL at least once to get each DOM object. Which is still probably faster.

  • yeah, it will be good if you don't have to support the "SHITTY" browsers like "FIREFOX" or ie.

    in the end, it is such an easy task that i don't think older IEs can't handle with speeds. Not to mention Firefox.

  • Isn't it bad practice to use custom attributes on HTML tags?

  • @limited06 kinda, its against the spec. If you like you can just add data- infront and then your valid html5 again

  • Another extremely valuable tutorial Sean. Thanks for sharing it with the rest of us.

  • Thanks so much, you are by far one of the best online for video coding tutorials

  • Nice tutorial :) 

  • Very useful video! ^_^

  • Thanks! Great tutorial!

  • Nice, just what I needed to know :D

  • Great tutorial. Just a little tip, if you're going to be using custom attributes then use the new html5 data attributes. Simply prepend "data-" on the attribute to make it valid html5.

  • @RTStaniforth thanks

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more