Skip to content

This is a very simple & lightweight jQuery plugin which detects the orientation of different HTML attributes

Notifications You must be signed in to change notification settings

aastrong/jQuery.orientation.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

orientation.js

This is a very simple & lightweight jQuery plugin which detects the orientation of an attributes you desire - and adds and appropriate class name ( Portrait, Landscape & Square).

Simply add the orientation.js file to the bottom of your file, and intialize the plugin on what ever images, divs or elements you desire. ( look at example below )

<script src="min/jquery.imageorientation.min.js"></script>
<script>
$(window).on('load', function() {
	$('img').orientation();
});
</script>

I have included an index.html as page as an example if need be.

Any feedback is greatly apprciated.

               _                     
  __ _ __ _ __| |_ _ _ ___ _ _  __ _ 
 / _` / _` (_-|  _| '_/ _ | ' \/ _` |
 \__,_\__,_/__/\__|_| \___|_||_\__, |
                               |___/ 

About

This is a very simple & lightweight jQuery plugin which detects the orientation of different HTML attributes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published