문제

I'm trying to uncheck checkboxes, with something like this

$(':checkbox:checked').prop('checked',false);

But it ocurred that i'm in other context and I can catch it by

this.window.parent.document;

I would like to connect both like

var z = this.window.parent.document;
z.(':checkbox:checked').prop('checked',false);

But I have no clue how to do it.

도움이 되었습니까?

해결책

You need to wrap z with jQuery $() and use .find()

$(z).find(':checkbox:checked').prop('checked',false);

다른 팁

$(this.window.parent.document).find(':checkbox:checked').prop('checked',false);

Like that ;)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top