• Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language
    JavaScript
  • Created almost 13 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Relevant Dropdown

A HTML5 datalist polyfill that depends on jQuery and Modernizr.

Datalist browser support (Dec 2011) is Firefox 4+, Opera 10.6+, and IE 10. It's reasonable that you'd want WebKit support. So. This.

Example HTML5 Markup

<input type="search" list="states" placeholder="Find U.S. State">

<datalist id="states">
	<option value="Alabama">
	<option value="Alaska">
  <!-- all states -->
</datalist>

Include jQuery and Modernizr in head of document

<script src="js/jquery-1.7.1.js"></script>
<script src="js/modernizr.custom.50983.js"></script>

Run the Modernizr test, and load polyfill stuff if needed

<script>
	yepnope({
	  test : (!Modernizr.input.list || (parseInt($.browser.version) > 400)),
	  yep : [
	      'js/jquery.relevant-dropdown.js',
	      'js/load-fallbacks.js'
	  ]
	});
</script>

load-fallbacks.js calls the plugin. Example contents:

$('#search').relevantDropdown();

$('#name').relevantDropdown({
  fadeOutSpeed: 0, // optional, default: 'normal;
	change: function(new_text) {
      console.log('the new value is: ', new_text);
  }
});

TODO

  • Better IE styling (drop shadows don't work)
  • Remove Modernizr and jQuery dependencies (make totally standalone)

More Repositories

1

AnythingSlider

A jQuery Slider plugin for anything.
CSS
1,148
star
2

serverless

The Power of Serverless for Front-End Developers
Astro
472
star
3

coding-fonts

https://coding-fonts.css-tricks.com/
HTML
461
star
4

The-Printliminator

JavaScript
359
star
5

MovingBoxes

Simple horizontal slider which grows up the current box when it's in focus (image, title & text) and back down when it's not in focus.
JavaScript
281
star
6

conferences

A public list of upcoming conferences https://conferences.css-tricks.com/
Nunjucks
236
star
7

AnythingZoomer

Zoom in on images or content
HTML
207
star
8

DragAvatar

HTML5 Drag and Drop Avatar Changer with Resizing and Cropping
JavaScript
74
star
9

Equalizer

Equalize column heights across multiple rows
JavaScript
70
star
10

Shapes-Of-CSS

Bunch of shapes you can make with only one element
64
star
11

Chat2

Chatroom with jQuery, PHP, and text files
PHP
54
star
12

Slide-to-Unlock

Replicating the iPhone's slide to unlock feature
JavaScript
44
star
13

jQuery-Organic-Tabs

Click the tabs to swap out content below, but the area fluidly adjusts in size to the new content, rather than jerk up or down.
HTML
34
star
14

Grid-Accordion

jQuery Accordion that works both vertically and horizontally as a table of cells
JavaScript
32
star
15

MagicLine

Navigation where the highlight follows the mouse
JavaScript
22
star
16

AnythingSlider-Themes

Extra themes for AnythingSlider
JavaScript
19
star
17

api-for-friendly-words

JavaScript
19
star
18

jQuery-Circulate-Plugin

Makes things go what in a circle n'everything.
18
star
19

BuildYourSocialPage

12
star
20

Dynamic-Page

JavaScript
12
star
21

build-process

CSS
11
star
22

View-Source-Button

Using jQuery, Code Prettify, and CSS3 :target, we can make a button that pops up a nice looking view of the current pages source code.
JavaScript
10
star
23

Indeterminate-Checkboxes

Checkboxes actually have three visual states: checked, unchecked, and indeterminate (even back to IE 6). The indeterminate state can only be set by JavaScript. This demo is of a set of nested checkboxes, a common use case for this third visual state.
9
star
24

Select-Cutoff-Fix

jQuery solution to IE 7/8 problem where select menus with fixed widths don't display wider options
8
star
25

Rotating-Feature-Boxes

Boxes rotate depending on what is selected. The featured box has extra displayed information.
8
star
26

Step-by-Step-Seminar-Registration

As different "steps" of the registration process are completed, the current step gets check off as done and the next step lights up. Includes some very basic form validation.
JavaScript
8
star
27

mod_anythingslider

Joomla 2.5 Mod for AnythingSlider by Ken Adam
PHP
5
star
28

quotes

QuotesOnDesign.com
PHP
4
star
29

AnythingSlider-Fx-Builder

Fx builder bookmarklet for AnythingSlider
JavaScript
4
star
30

css-webring

3
star