javascript function not working with rails
I'm facing a prob开发者_运维问答lem: I have a javascript function in my application.js but it's not working correctly. Always when I click in the button, it gives me this error in the firebug:
goto_nex_photo is not defined
but I have this function implemented in the application.js. I don't what is going wrong. I will post the code of application.js and the gallery_detail.html.erb:
https://gist.github.com/902973
Line 600 you have a random F at the start of the line.
That is a lot of code to work though. To much for me but I can offer you a method to find what is broken. Mostly likely there is something wrong with some piece of code above that function in the javascript.
Start by moving that function to the top of the script... ... then move it subsequently down ... one method at a time until you find the method that had the bad code...
Another thing you could do is look at the RAW html actually outputted and make sure that the javascript include for the function is there... I did actually check your code and it looks like all your curly braces match up...
精彩评论