I am using Sitefinity ver 9.1 and I want to use fancybox jquery plug in my custom widget.
I am putting an image from the sitefinity Image Library on the page content block and using the widget I want all the other images of the gallery to open up in a fancybox when the user clicks on the single image present on the page. For this I am have written a jquery click function inside the script tag in my view.cshtml file.
I am unable to get the fancybox working. I tested if my program is hitting the jquery click function by putting an alert box and it works fine, but the fancybox does not show up.
I read "http://docs.sitefinity.com/feather-refer-to-resources-inside-views documents" to add built in JQuery in my project at it says I need to use @Html.Script(ScriptRef.JQuery) but when I write this line in my View file, it gives an error saying the HtmlHelper<dynamic> does not contain a definition of script.
I read that Sitefinity 9.1 has jquery version 1.12.1 and I want to use the Sitefinity buit in jquery in my project. Please let me know how to do this .