Revision: 53238
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 17, 2011 02:59 by cessnajumpin
Initial Code
parseInt($('.element-class').css('width').replace(/[^-\d\.]/g, '')); Usage would be: var totalWidth = parseInt($('.portfoliowrapper').css('width').replace(/[^-\d\.]/g, ''));
Initial URL
Initial Description
A quick snippet that removes the 'px' when accessing a value through jquery, and converts it into an integer.
Initial Title
jquery css values to integers
Initial Tags
css, jquery
Initial Language
jQuery