Monday, 15 December 2008
Aspnet life cycles events Cheat Sheet
Friday, 12 December 2008
Profiler for .NET
http://www.jetbrains.com/profiler/
Monday, 1 December 2008
JQuery - Count Paragraphs
- Add JQuerify bookmarklet to this page. (Get JQuerify here)
- $('#NoOfParagraphs').click(showNoOfParagraphs)
Example taken from here docs.jquery.com
..1..
"The quick brown fox jumps over the lazy dog" is a pangram (a phrase that contains all of the letters of the alphabet). It has been used to test typewriters and computer keyboards, and in other applications involving all of the letters in the English alphabet, because it is also a short coherent sentence.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into....
..4..
function showNoOfParagraphs(e)
{
$('#NoOfParagraphs').click(function() {
$("div.FadeAndAnimation p.ParagraphResults").append(" Paragraph Count :-" +
$("div.FadeAndAnimation p").size() + "");
}
JQuery - Basic Show and Hide
- Add JQuerify bookmarklet to this page. (Get JQuerify here)
- $('#hideh1').click(function() {$("div[class='titlewrapper']").hide();});
- $('#showh1').click(function() {$("div[class='titlewrapper']").show();});
- $('#toggleh1').click(function(){$("div[class='titlewrapper']").toggle();});
Example taken from here... docs.jquery.com
Sunday, 30 November 2008
JQuery Predicates - Attribute contains
- Add JQuerify bookmarklet to this page. (Get JQuerify here)
- $("#lnkRedAttributeContains").click(showRedContains);
- $("#lnkYellowAttributeContains").click(showYellowContains);
click me yellow
click me red
The click me red also finds the two links as their ids match the predicate. The click me yellow is specifically looking for div elements therefore the two links are not turned yellow.
JQuery Predicate, attribute Contains
$("[ @id *= 'ributeCont' ]").removeClass("YellowAttributeContains").addClass("RedAttributeContains");
$("div[ @id *= 'ributeCont']").removeClass("RedAttributeContains").addClass("YellowAttributeContains");
JQuery Predicates - Attribute ends with
- Add JQuerify bookmarklet to this page. (Get JQuerify here)
- $("#lnkRedAttributeEndsWith").click(showRedEndsWith);
- $("#lnkYellowAttributeEndsWith").click(showYellowEndsWith);
click me yellow
click me red
The click me red also finds the two links as their ids match the predicate. The click me yellow is specifically looking for div elements therefore the two links are not turned yellow.
JQuery Predicate, attribute Ends With
$("[id$='teEndsWith']").removeClass("YellowAttributeEndsWith").addClass("RedAttributeEndsWith");
or
$("div[id$='teEndsWith']").removeClass("RedAttributeEndsWith").addClass("YellowAttributeEndsWith");
JQuery Predicates - Attribute starts with
- Add JQuerify bookmarklet to this page. (Get JQuerify here)
- $("#lnkRedAttributeStartsWith").click(showRedStartsWith);
- $("#lnkYellowAttributeStartsWith").click(showYellowStartsWith);
$("[id ^= 'HelloGoodbyeAttributeSt']")
.removeClass("YellowAttributeStartsWith")
.addClass("RedAttributeStartsWith");
or
$("div[id^='HelloGoodbyeAttributeSt']")
.removeClass("RedAttributeStartsWith")
.addClass("YellowAttributeStartsWith");
JQuery Predicates - Attribute equals
- Add JQuerify bookmarklet to this page. (Get JQuerify here)
- $("#lnkRedAttributeEquals").click(showRed)
- $("#lnkYellowAttributeEquals").click(showYellow);
JQuery Predicate, id attribute equals
$("#HelloGoodbyeAttributeEquals").removeClass("YellowAttributeEquals").addClass("RedAttributeEquals");
or another syntax for an id attribute equals
$("[id='HelloGoodbyeAttributeEquals']").removeClass("YellowAttributeEquals").addClass("RedAttributeEquals");
or a div tag with an id equals
$("div[id='HelloGoodbyeAttributeEquals']").removeClass("YellowAttributeEquals").addClass("RedAttributeEquals");
function showRed(e) {
e.preventDefault();
$("[id='HelloGoodbyeAttributeEquals']").removeClass("YellowAttributeEquals")
.addClass("RedAttributeEquals");
}
function showYellow(e) {
e.preventDefault();
$("#HelloGoodbyeAttributeEquals").removeClass("RedAttributeEquals")
.addClass("YellowAttributeEquals");
}