I'm trying do do something like this:
var items = $("main a").unique();
var links = [];
items.each(function (index, value)
{
links.push({
href: this.href,
text: this.text
});
});
the idea is to find all links on page and remove duplicates, producing an object with href/text pairs. But the above does not work, I'm getting "TypeError: $(...).unique is not a function"