Skip to content

will-e-yams/yams.whichway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

yams.whichway.js

a jQuery plugin that adds orientation classes to the body tag

Summary

On mobile devices, this will add the class device-portrait when the device is oriented portait and device-landscape when the device is oriented landscape.

Requires

  • jQuery

Usage

<script type="text/javascript" src="yams.whichway.js"></script>
<script type="text/javascript">
    // add callbacks before document ready
    $.yams.whichway.addCallback(funcion(orientation) {
        console.log('orientation is now ' + orientation)
    })
</script> 

About

jQuery plugin to add orientation class to body

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published