also, could you create gist with your code? gist.github.com Matt
On May 8, 2013, at 3:27 PM, buyzlots <[email protected]> wrote: > Your coffeeScript looks fine, I don't think that error is in reference to > that as your coffee references '#big_image' and not 'big_image_div' what is > 'big_image_div'? > On May 8, 2013, at 1:22 PM, Dave Castellano <[email protected]> wrote: > >> Hi, >> I'm an amateur learning Rails, and having trouble understanding how to >> include different jQuery selectors in the same scope since Rails 3. >> >> eg How do I include $('#big_image'), which is on the same page as >> $('#little_image'), in the scope of of the following? >> >> questions.js.coffee: >> $('#little_image').click -> >> if little_image.style.display == "block" # Hide little image/show >> big image >> $('#little_image').hide() >> $('#big_image').show() >> >> ERROR: Uncaught ReferenceError: big_image_div is not defined >> >> I get why big_image_div is not in the scope of $('#little_image'), but >> could use some guidance as to how to go about making this work. >> >> >> Thanks >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

