Blog

Archive for the ‘jQuery’ Category

Jquery Tip: How to wrap tags dynamically

Saturday, August 8th, 2009

Quick tip:

In order to wrap a <span> around an <a> tag for example:

<ul>
<li>item 1</li>
<li>item 2</li>
</ul>

to:

<ul>
<li><span>item 1</span></li>
<li><span>item 2</span></li>
</ul>

Apply this jquery call:

<script type="text/javascript">
$(document).ready(function() {
    $("li a").each(function() {
        $(this).wrap('<span/>');
    });
});
</script>

Linking to Google’s Hosted jQuery Repository

Sunday, November 30th, 2008

jQuery Hosted on Google:

Here’s the code to link to Google’s jQuery repository. It grabs the latest jQuery version.

<script src="http://code.jquery.com/jquery-latest.js"></script>

If you want to target a particular version of jquery:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>

Google link to jQuery:

You can go here http://code.google.com/p/jqueryjs/downloads/list for the download list and right-click copy-link location.

Jquery CDNs

Go to http://docs.jquery.com/Downloading_jQuery for a list of CDNs

 

Updated: 6/14/11 12:22pm

jQuery Widget and Cheat Sheets

Tuesday, July 22nd, 2008

I have to admit I’m biased when it comes to jQuery. Let’s face it, write less, do more, it’s as easy as that. if you’re a CSS coder or designer, jQuery is awesome. It’ feels natural calling a class name or an id just the way you would writing a css rule. There is really no excuse not to add behavior to your site, expecially since the advent of jQuery.

So what do I have for our jQuery lovers today?


A jQuery Widget for Mac

jQuery Widget

jQuery Widget

jQuery Cheat Sheets