Skip to main content
edited title
Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

How can I rewrite this in a simpler way using jQuery? Navigating around ul li and looking for the active state on the current slide

deleted 1 character in body; edited tags; edited title
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

How can I rewrite this in a simpler way using jQuery (this is coffeescript)?

How can aI rewrite this in a simpler way.?

$imageContainer = $($(this).parent().children()[0]).children()
currentIdx = 0
for e, idx in $imageContainer
  if e.className.indexOf('active')
    currentIdx = idx
    break

How can rewrite this in a simpler way using jQuery (this is coffeescript)

How can a rewrite this in a simpler way.

$imageContainer = $($(this).parent().children()[0]).children()
currentIdx = 0
for e, idx in $imageContainer
  if e.className.indexOf('active')
    currentIdx = idx
    break

How can I rewrite this in a simpler way using jQuery?

How can I rewrite this in a simpler way?

$imageContainer = $($(this).parent().children()[0]).children()
currentIdx = 0
for e, idx in $imageContainer
  if e.className.indexOf('active')
    currentIdx = idx
    break
Source Link

How can rewrite this in a simpler way using jQuery (this is coffeescript)

How can a rewrite this in a simpler way.

$imageContainer = $($(this).parent().children()[0]).children()
currentIdx = 0
for e, idx in $imageContainer
  if e.className.indexOf('active')
    currentIdx = idx
    break