find() not working in Chrome or Safari
The
RED text in the script stops working in Chrome and Safari. Any ideas on why or how to make it work?
Note: The code in red is on a single line.
$(
".poll"
).each(
function
(pIndex, pollDiv)
{
$(pollDiv).find(".answer").each(function(aIndex, answerDiv)
{
// Do something
});
});
HTML:
<div
id
="divPoll"
class
="poll">
<
div
class
="title">
Pick a value:
<
hr
/>
</
div
>
<
div
class
="answers">
<
div
class
="answer">
<
div
>
<
input
type
="radio"
name
="poll2"
id
="Answer1"
class
="poll2 visible"
value
="1"
/><
label
for
="Answer1">
Value 1
</
label
>
</
div
>
<
div
class
="graph">
</
div
>
</
div
>
<
div
class
="answer">
<
div
>
<
input
type
="radio"
name
="poll2"
id
="Answer2"
class
="poll2 visible"
value
="2"
/><
label
for
="Answer2">
Value 2
</
label
>
</
div
>
<
div
class
="graph">
</
div
>
</
div
>
</
div
></
div
>