RespondTo
Easy JS breakpoint detection utility
Install / Use
/learn @jpgcode/RespondToREADME
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
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
