SkillAgentSearch skills...

RespondTo

Easy JS breakpoint detection utility

Install / Use

/learn @jpgcode/RespondTo
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

#RespondTo utility Build Status

<p align="center"> <img height="271" width="405" src="https://raw.githubusercontent.com/jpgcode/respondTo/master/demo/intro.jpg"> </p>

Method to detect breakpoints with Javascript.

It returns "true" if the conditions defined are met. This utiliy uses mobile-fist methodology.

##Support

Internet Explorer 10+. It uses window.matchmedia.

##Instalation

###Bower

bower install respondTo

###Manually Download respondTo.min.js from the dist folder and add it to your project.

##Usage

Detect mobile breakpoint (max-width: 767px):

respond.to('mobile');

Detect tablet breakpoint (min-width: 767px) and (max-width: 1023px):

respond.to('tablet');

Detect desktop breakpoint (min-width: 1023px):

respond.to('desktop');

Custom breakpoint. Just send a number with the breakpoint you want to use. It will use it in a min-width conditional:

respond.to(1280);

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Authors

Jose Pablo Granados

License

Copyright (c) 2016 Jose Pablo Granados Released under the MIT license

Related Skills

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated4y ago
Forks0

Languages

HTML

Security Score

70/100

Audited on May 12, 2021

No findings