Giter Club home page Giter Club logo

jqdropdown's Introduction

Have you ever tried styling an HMTL form? Had a good time reproducing the "select" list from your client's funky Photoshop mockup? Probably Not.

By now you must have found out that HTML select lists are pretty limited style-wise. You can't reshape them as you want and the default appearance is based on the browser/OS. For example, the toggle arrow can't be replaced and is different in Firefox then Internet Explorer. You also can't use custom images as background for the dropdown lists, which can be seriously annoying for designers/developpers.

It might not be the best UX practice to redesign form elements to blend into the page design, because users are accustomed and know how to use them. However, when trying to create gorgeous designs or please the client, the choice might not be yours.

This is where this small plugin comes into play.
What does it do exactly?

Basically, this jQuery plugin allows you to create select lists for HTML forms using semantic markup, and then style them exactly as you want. To do so, it creates a brand new, fully customizable list based on the original, with the exact same behavior. If you keep the default style (using the css provided with the plugin), the user shouldn't even notice the difference.

Here's a little more detailed explanation:

* The plugin starts by readings the <option> of your list and hidding it;
* It then recreates the list using more friendly HTML tags like <ul>, <li> and <a> ;
* Some custom styling classes are added to the list;
* Finally, all of the default features are added to the new list, including dynamic resizing based on the largest element, keyboard search & navigation, pre-selected options, focus behavior and dynamic vertical orientation based on the height & position of the list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.