Use of split function using jquery
<p>I am getting CSS 'left' property value. now it is set on -50. so i want to get only 50 can this be done with split function or there is another way to do that. Also why split function is not working in my function</p>

<pre><code>&lt;head&gt;

&lt;script type="text/javascript" src="jquery-1.7.2.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt;

$(document).ready(function() {

$('.box').click(function (){

    var kar=parseInt($(this).css('left'))

var jj= kar.split('')

alert(jj[0])

    })

});
&lt;/script&gt;


&lt;style&gt;

.container {

    margin:auto;
    width:500px;
    position:relative

}


.box { background:#FF0000; width:200px; height:200px; position:absolute;left:-50px;}

&lt;/style&gt;

&lt;/head&gt;

&lt;body&gt;
&lt;div class="container"&gt;
&lt;div class="box"&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;/body&gt;
</code></pre>
