Somehow I don't get the concept of get() right. The following
expression gives an error;

$('p.fl').get(0).css('background', 'red');

Now what I'm trying to do here is select the first paragraph from all
the paragraphs with a class of "fl". After that I'm just trying to get
a visual id by making it red but it's more about grabbing the element
really. There's probably a very good reason why this doesn't work but
what I understand from documentation this should work?

This ultimate goal is to hide a paragraph based on it's index. This
index is gotten from a clicked link. So far I've got this, but it's
stuck on the get() part.

$('a.leesmeer').click(function()
{
        var nmbr = $('a.leesmeer').index(this);
        $('p.fl').get(nmbr).hide();
        $('div.case').get(nmbr).show();
        return false;
});

Reply via email to