Daily Archives: 21/02/2012


/*Element auto scroller*/ function scroll_to_bottom(obj,speed){ //$('html, body').animate({scrollTop: $('html, body')[0].scrollHeight}); if(!obj){ obj = $('html, body'); } if(!speed){ speed = ''; } obj.animate({scrollTop: obj[0].scrollHeight},speed); } function scroll_to_top(obj,speed,top_margin){ //$('html, body').animate({scrollTop:0}); if(!obj){ obj = $('html, body'); } if(!speed){ speed = ''; } if(!top_margin){ top_margin = 0; } obj.animate({scrollTop:top_margin},speed); } usage $(document).ready(function(){ var obj = […]

Few useful js / jquery functions in day today life


Few useful php functions in day today life..! /*This function strip html tags you want , Inside text area. In database those tags will not inserted */ function strip_only($str) { $tags = array('html','body','style','div', 'table','tr','td','script','img'); if(!is_array($tags)) { $tags = (strpos($str, '>') !== false ? explode('>', str_replace('#is', '', $str); return $str; } […]

Few useful php functions in day today life..!