Sara Chipps recently posted a simple DOM based clone template method she uses in one of her apps. "Easy HTML Templating with JQuery"
My template looks like this:
PLAIN TEXT
CODE:
<script id="ItemTemplate" type="text/html"
<li class="item" value="|rowNumber|">
<input type=”text” id=”input|rowNumber|” />
</li>
</script>
Now within [...]
Microsoft announced a new Content Delivery Network for their ASP.NET AJAX JavaScript libraries and jQuery. This means that instead of hosting those libraries on your server, you can just link to the versions on Microsofts server. I made a simple page that takes a querystring parameter (q=) and uses the ASP.NET AJAX dynamic templates to [...]
JavaScript: A tool too sharp?
Script# (Script Sharp) – writing javascript in C#
Both Jimmy and roy have great posts discussing JavaScript. Roy is looking at it as a C# developer lured by the many, many articles about how jQuery is the only thing that makes JavaScript worth using and using Script# to abstract away some of [...]
So this isn't anything new, but sometimes you have to work with plain JavaScript and can't lean on a library. I thought I'd put this out there. This is my map function. There are many like it, but this one is mine.
PLAIN TEXT
CODE:
Array.prototype.map = function(fn) {
var r = [...]
Also filed in
|
|
jQuery makes it really easy to wire up event handlers using anonymous functions.
PLAIN TEXT
CODE:
<script type="text/javascript">
$(document).ready(function()
{
$("#Button1").click(function(event)
{
alert("You Clicked Me!");
});
});
</script>
In this case you are just wiring up one element to an event. Lets [...]
Also filed in
|
|
jQuery ... Worst Practices
In this post, Steve Wellens tries to make the case for two common patterns your run across when using jQuery as "worst practices". Practices that are either superfluous or harmful to your code.
1) Wiring up events using unobtrusive JavaScript.
Instead of wiring up your elements events using jQuery, instead you should set the [...]