A very basic question about a code..
Hello everyone,
I'm new in jQuery and to this forum... Hope you can help me around :)
I understand the following code, I just don't understand why it is actually executed if it is set to a variable...
Isn't it supposed to work only if I omit the "var co = "?
Thanks,
Kobi.
<script>
(function() {
var co = $('span.co').each(function () {
var $this = $(this);
$('<blackquote></blackquote>', {
class: 'co',
text: $this.text()
}).prependTo($this.closest('p'));
});
})();
</script>