Created
October 3, 2013 01:35
-
-
Save widged/6803303 to your computer and use it in GitHub Desktop.
ResponsiveTester Usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<! -- ... --> | |
<link rel="stylesheet" href="css/responsiveTester.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> | |
<! -- ... --> | |
</head> | |
<body> | |
<div id="myTester"></div> | |
<script src="js/ResponsiveTester.js"></script> | |
<script> | |
$(function(){ | |
var ResponsiveTester = widged.ResponsiveTester; | |
var stylesheets = ['css/a-component.css']; | |
var contentToTest = function() {/* | |
<h3>Responsive Content</h3> | |
<p><a href="#">Lorem ipsum</a> dolor sit amet, consectetur adipiscing elit. Mauris eget justo pretium, blandit purus id, faucibus libero. Sed pellentesque est nisi, sit amet adipiscing risus sollicitudin ut. Nullam laoreet tellus id mi bibendum gravida. Aliquam nec odio sed ante sollicitudin congue. Curabitur placerat, ligula sed ultrices pulvinar, dui eros convallis est, eu fermentum justo nisi vitae nibh. Vestibulum vitae pretium nunc. Donec aliquet justo velit, at molestie est porttitor sed.</p> | |
</div> | |
*/}.toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1]; | |
var tester1 = ResponsiveTester.instance().target($('#myTester').first()).width(40).html(contentToTest).stylesheets(stylesheets).render() | |
}); | |
</script> | |
</pre> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment