An exception is ":this()"also inside operators "if()", what can an operator mean ":"?
In the following example, which seems to be irrelevant, I want to find <a href>one of two things in the link collection :
- all elements that do not have a class .ib-content;
- the first
<span>inside all found links <a href>that match the criteria having "objToWhom_Id" (func passed var) on, this is the text.
So, for example, in this code:
init_stuff = function(objToWhom_Id) {
$ibItems = $ibWrapper.find('div.ib-main > a');
$ibImgItems = $ibItems.not('.ib-content');
if(objToWhom_Id == "allHTMLitems"){
imgItemsCount = $ibImgItems.length;
}else{
++imgItemsCount;
$ibImgItems : $ibItems.find('span:first').filter(':contains(objToWhom_Id)');
console.log($ibImgItems.html();
}
}
everything works fine (the init_stuff () function is delayed, btw) ...
But if we change the above line to:
$ibImgItems = $ibItems.find('span:first').filter(':contains(objToWhom_Id)');
which should be reasonable doesn't work anymore ... :-P
Any help?
EDITED
":" , ( !) init_stuff() :
$ibImgItems.bind('click.ibTemplate', function(clik_$ibImgItem) {
clik_$ibImgItem.preventDefault();
openItem($(this));
return false;
});
, @Hans!; -)