Skip to content

Instantly share code, notes, and snippets.

@dayAlone
Last active June 18, 2017 13:29
Show Gist options
  • Save dayAlone/42e76d4cd5fff965897e76a9d54fe392 to your computer and use it in GitHub Desktop.
Save dayAlone/42e76d4cd5fff965897e76a9d54fe392 to your computer and use it in GitHub Desktop.
console.table($('#testform fieldset').map((key, el) => {
const parent = `#testform .testvoprosblock > div:nth-of-type(${key+1})`
const right = parseInt($(`${parent} input[value="2"]`)[0].getAttribute('valuez'), 10) + 1
const result = {
title: $(`${parent} .testvopros`)[0].innerHTML,
right: $(`${parent} .stylezed:nth-of-type(${right}) label`)[0].innerHTML,
}
return result
}).toArray())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment