I am using rails4 and i want to include zooming feature in my app. I am follwing first example of this- http://zoomsl.sergeland.ru/example/ I put the .js file in javascripts folder and wrote the function to call the method from the js file in the script code below the page but it say "undefined method" in console. I checked in the source that the file is there in the list of all the js files which are included in the app, and I found it there. Please help.. Am I missing something?
Edit: I have included the js file in assets which is downloaded from the above link. In template
<Img class = "my-foto" src = "<%= p.asset1.url(:small)%>" Data-large = "<%= p.asset1.url(:large)%>" title = "Photos" >
<Script>
$(document).ready(function(){
$ ( ".my-foto" ). imagezoomsl ({ <-----Here is the error "Undefined is not a fuction
zoomrange : [ 3 , 3 ]
});
});
</ script>
Another try:I downloaded the demo1.zip. In that demo if zoomsl-3.0.min file is not included it displays an msg-Please include zoomsl-3.0.min file. I copied the code in my app and found that its displaying the same message, even though I have included it and checked it also by console.log. I cant get it, Why its happening like this?