CSS to Remove New-lines or Breaks After Form Tags

Filed Under (General) by Wenbert on 03-03-2008

Tagged Under : ,

Put this inside your form tags:

  1.  
  2. style="margin: 0pt; display: inline;"
  3. //so it would be something like:
  4. < form style="margin: 0pt; display: inline;"> Input boxes here…< / form >

Hightlight a table row on click using jQuery

Filed Under (General) by Wenbert on 19-02-2008

Tagged Under : , ,

The scenario: Every time you click on a row, the row highlights. When you click on the highlighted row - remove the highlight.
The jQuery / Javascript code:

  1.  
  2. //highligths the clicked row
  3. function highlightrow(obj) {
  4.     if ($(obj).attr("style")==‘background-color: rgb(255, 255, 187);’ || $(obj).attr("style")==‘BACKGROUND-COLOR: #ffffbb’) {
  5.         $(obj).removeAttr("style");
  6.     } else {
  7.         $(obj).attr("style","background-color: #FFFFBB;");
  8.     }
  9. }
  10.  

And for the HTML Code:

  1.  
  2. ..rest of the HTML tags here…
  3. < tr onclick="highlightrow(this);" >
  4. ..rest of the HTML tags here…
  5.