JQueryFancyBox not working in Custom Widget

Posted by Community Admin on 04-Aug-2018 21:55

JQueryFancyBox not working in Custom Widget

All Replies

Posted by Community Admin on 25-Apr-2014 00:00

Hi There,

I have creating a simple user control in the website where I have an image as a link and when I click on the image link it should open a Fancybox with the image, but instead it is not working and giving error in the Fancy box jquery.

 I think the JavaScriptLibrary="JQuery" is not loading at all. Let me explain:


<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" TagPrefix="sf"%>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<sf:ResourceLinks ID="ResourceLinks1" runat="server">
   <sf:ResourceFile JavaScriptLibrary="JQuery" />
    <sf:ResourceFile JavaScriptLibrary="JQueryFancyBox" />

<div id="SingleProd">
   <a href="localhost:60876/.../high-rise-tve-350-popup" rel="PAVfancybox" title ="TVE_350" >
       <img src="temspec.in-development.ca/.../tve_350">

<script language="javascript" type="text/javascript">
    $(document).ready(function ()

 Now, Whenever I hit the link it gives me the following Error:

Unhandled exception at line 26, column 185 in localhost:60876/Telerik.Web.UI.WebResource.axd

0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'onCleanup'


NOTE: Just to let you know the user control is an "Embedded Resource."

Please guide me here how to resolve this issue.




Posted by Community Admin on 29-Apr-2014 00:00


Can anybody please help me here ?

Posted by Community Admin on 12-May-2014 00:00

Hi there,

Can please let me know if anybody on Sitefinity's team can help me here or would it be easier if I should open a ticket ?

 Please reply ASAP.


Posted by Community Admin on 13-May-2014 00:00

Hello Nimit,

You should reference the Fancybox css and it should work fine:

<sf:ResourceLinks ID="ResourceLinks1" runat="server">
   <sf:ResourceFile JavaScriptLibrary="JQuery" />
    <sf:ResourceFile JavaScriptLibrary="JQueryFancyBox" />
  <sf:ResourceFile Name="Telerik.Sitefinity.Resources.Themes.Basic.Styles.fancybox.css" Static="true" />

Nikola Zagorchev
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items

This thread is closed