html
I've wrote these words on google. And I don't find the exact solution.
The problem:
What Should I write in the href? If I write # sign then browser go to the top of page. I wouldn't like to go to the top of page.
Here is the HTML:
<a href="#" id="example" >Click</a>
jQuery code:
<script> $('#example').click(function() { alert('Hello'); return false; }); </script>
The return false; command is the key. When use this return value. The links lost their default behavior.
Here is my HTML number formatter. Sometimes the browsers wrap the numbers along thousand separator or decimal pont, but this function prevents this event.
function html_number_format($number, $decimals = 2, $dec_point = '.', $thousands_sep = ',') { if ($number === FALSE) { return '---'; } return '<span style="white-space: nowrap;">'.number_format($number, $decimals, $dec_point, $thousands_sep).'</span>'; }
