Tuesday, March 16, 2010

Even and Odd Rows



Family Members

  • Ralph

  • Hope

  • Brandon

  • Jordan

  • Ralphie



Friday, March 12, 2010

Draw a yellow line under the 8th list item.



  1. Boston Bruins

  2. Washington Capitals

  3. New Jersey Devils

  4. Pittsburgh Penguins

  5. Philadelphia Flyers

  6. Carolina Hurricanes

  7. New York Rangers

  8. Montreal Canadians

  9. Florida Panthers

  10. Buffalo Sabres

  11. Ottawa Senators

  12. Toronto Maple Leafs

  13. Atlanta Thrashers

  14. Tampa Bay Lightning

  15. New York Islanders




Performing an action on a subset of the selected set

Wednesday, March 10, 2010

Load MySpace with jQuery


How to copy a portion of DOM in jQuery

Following code will create a list before ".post-body" class and copy it and appends it after the class.




Tuesday, March 9, 2010

The easiest way to insert javascript, html code to SyntaxHighlighter

Button created right below this

The easiest way to use SyntaxHighlighter, that I found, is insert your code in the
<pre> tag without any html encoding, then run following javascirpt. '.js' is a class name of the pre tag. If you have multiple pre tags, then add id in the pre tag and apply following script with id selector instead of class selector. (Of course, do not include new line(s) in your code if you are using blogger site.)











Fade In and fade out

This is fade in and out sample.


<script type="text/javascript">

$('<button id="btnFadeOut">Fade Out</button>id="btnFadeIn" style="margin-left:10px;">In</button>p id="pFadeInOut">paragraph can fade in and out</p>')
.filter('#btnFadeOut')
.click(function(){$
('#pFadeInOut').fadeOut(3000);
})
.end()
.filter('#btnFadeIn')
.click(function(){
$('#pFadeInOut').fadeIn(3000);
})
.end()
.insertAfter('.fadeInOutContext');
</script>