📜 ⬆️ ⬇️

Replacing standard select in browser

Selectimus


On the current project some time ago there was a task to unify selects in all browsers. It was necessary to change them so that with the same display, they externally remained close to the standard but at the same time had the possibility of flexible adjustment by means of CSS. After searching the finished libraries, at that time I did not find anything suitable and decided to make my own. Took as a starting point the design close to the standard, plus the replacement of the scrollbar, from the standard system to its own, also the same in all browsers. Implemented script as jQuery plugin. The required jQuery version is 1.5+.

The mechanism of operation is as follows:


')
Plugin features:



Plugin initialization:
$([elemenet]).selectimus([style] [, options]) 


When initializing the plugin, if no additional style parameters are passed, the default styles are applied:



Sources are here.
Demo page with description here.

Plugin scrollbarJS


Replaces the standard scroll bar in the elements on the page, to which the overflow: hidden property is applied, to the universal one in all browsers. Now works only with vertical content. In the development is also the possibility of adding options to customize the appearance of the scroll bar.

Sources are here.

Perhaps this is useful to someone.

UPD: Thank you all for the comments. I will finish defects)

Source: https://habr.com/ru/post/168973/


All Articles