colorbox check parent element exist -
I am using colorbox to open a window that shows a grid with categories to select the check box After, I attract categories on the parent window. So far good.
My problem is that before I check that the category exists in the original window, but it is not working
if ($ ('# cat- 2 ', window.parent.document) .length == 0) $ (' # categories', window.parent.document) .append (newdata);
Am I missing something
if ($ ('# Cat-2', window.parent.document) Length == 0)
is saying "# cat -2 no do something while it is present".
Probably only try if ($ ('# cat-2', window.parent.document) .length)
Comments
Post a Comment