Created
September 16, 2013 18:17
-
-
Save krisives/6584402 to your computer and use it in GitHub Desktop.
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> | |
</head> | |
<body> | |
<div class="bar"> | |
Bar | |
</div> | |
<script> | |
$(function () { | |
var bar = $('.bar'); | |
console.log('Raw: ' + bar.css('width')); | |
var width = bar.css('width').replace('px', ''); | |
console.log('Original ' + width); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment