jQuery: how to split string?
See more articles in PHP category
There are many chances to split string with delimiter .
jQuery has a function which is very similar to PHP explode.
If you just want to take 'Oct 30', you can use this jQuery syntax.
This will print out
jQuery has a function which is very similar to PHP explode.
<span class="example">Oct 30, 2011 to Nov 05, 2011</span>
If you just want to take 'Oct 30', you can use this jQuery syntax.
$(".example").val().split(",")[0];
This will print out
Oct 30


