[jQuery] some novice questions

[jQuery] some novice questions


I have this:
http://www.crtaci.info/majice.html
which i am loading here and adding some content with jquery:
http://www.crtaci.info/index.php?autocom=majice
$(function() {
    $.ajaxSetup ({
        cache: false
    });
    var loadUrl = "majice.html";
    $("#majice").load(loadUrl);
    setTimeout(function() {
        $(".tShirt").wrap("<div class='majica'></div").after("<span
style='display:block'>[od 790. dinara]</span>");
    }, 2000);
});
Now, what is the best way for me to do the following:
1. count how many instances of ".tShirt" there is
2. after every 4th add "<br />"
My head is blank atm and i am soo very sleepy.



















    • Topic Participants

    • gavra