May 2013

How to remove line break in perl?

$line =~s/\n//g;

s - search and replace
\n - line break
g- replace all the occurrence of \n

JQuery - How to remove the , in the number format?

$rupees = $rupees.replace(/,/g,'');
g is used to remove all the occurance of , in the number format.

jQueryhow to add and remove class?

Use addClass to add css class to the element.

$("#check_all").addClass("hidden");

removeClass used to remove css class attached with the element.

$("#check_all").removeClass("hidden");

How to include the scrollbar to the div tag?

If you want to display the large data inside div. If those cases need to include scrollbar. If the content beyond its height then veritial scrollbar will be shown.If it too wide then horizontal scrollbar will appear.

Include overflow:auto style to display the scrollbar.

<div id="id_news" style="width:200px;height:300px;overflow:auto">
</div>