Skip to content

MathiasaurusRex/screen-size-getter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

screen-size-getter

Tie your JS to your actual breakpoints. Check it out here: http://mathiasrechtzigel.com/JS-screensize-getter/

In each of your stylesheets add a qualifier to your body:after {content:"small/medium/large"}

Invoke this by calling currentWindowSize

If the functionality changes between small & medium just throw it into a if/else statment.

if (currentWindowSize === "small"){

//Do stuff

}

else {

//Do some other stuff

}

About

Pure JS solution to grab a pseudo element's content attribute.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published