+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Jquery Lightbox Conflict / Error

Jquery Lightbox Conflict / Error

8 posts, 0 answered
  1. gohigher
    gohigher avatar
    25 posts
    Registered:
    24 Nov 2008
    17 May 2010
    Link to this post

    Currently we are developing a website where we use jquery functionality to slide up and down a hidden div in the footer. We are also using the SIteMenu drop down control in the header of each page throughout the website which has jquery functionality as well. The problem that we are having is when we add the footer code to a page which uses the image gallery lightbox control we receive the following error:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
    Timestamp: Mon, 17 May 2010 18:53:19 UTC

    Message: 'style' is null or not an object
    Line: 107
    Char: 6
    Code: 0
    URI: http:[test site]/Sitefinity/ExternalLibraries/lightbox/js/lightbox.js

    Has anyone encountered a similar problem when integrating jquery and if so how were you able to resolve this issue? Thank you.

     

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    18 May 2010
    Link to this post
    Hi gohigher,

    Thank you for using our services.

    This is a known issue that the lightbox library which we use has some issues in regards with jQuery. This is why I can suggest that you utilize a different lightbox library. For instance one which is based on jQuery. I have attached a control template for the Image Gallery control to work with a jQuery based lightbox lib. You need to add the content of the archive to your project. Then set the Image Gallery control to point to the custom control template as in attached image. You might also need to resolve the paths for the navigation button images in the control template:
    <script type="text/javascript">
        $(function() {
            var settings = {
            imageLoading: '/Sitefinity/ExternalLibraries/NFLightBox/images/loading.gif',
            imageBtnPrev: '/Sitefinity/ExternalLibraries/NFLightBox/images/prev.png',
            imageBtnNext: '/Sitefinity/ExternalLibraries/NFLightBox/images/next.png',
            imageBtnClose: '/Sitefinity/ExternalLibraries/NFLightBox/images/close.png',
            imageBlank: '/Sitefinity/ExternalLibraries/NFLightBox/images/blank.gif',
            imageBtnBottomPrev: '/Sitefinity/ExternalLibraries/NFLightBox/images/btm_prev.gif',
            imageBtnBottomNext: '/Sitefinity/ExternalLibraries/NFLightBox/images/btm_next.gif',
            imageBtnPlay: '/Sitefinity/ExternalLibraries/NFLightBox/images/start.png',
            imageBtnStop: '/Sitefinity/ExternalLibraries/NFLightBox/images/pause.png'
            };
            $('#gallery a').lightBox(settings);  
        });  
    </script>


    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Les
    Les avatar
    5 posts
    Registered:
    18 Sep 2006
    31 May 2011
    Link to this post
    Hi,

    I'm trying to implement this but I'm unclear about the one step. How do you set the Image Gallery control to point to the custom control template?

    Thanks.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    31 May 2011
    Link to this post
    Hello,

    The ImageGallery has a public property - ItemListTemplatePath that you can set to the location of the external template.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  5. Duncan Evans
    Duncan Evans avatar
    122 posts
    Registered:
    07 Jul 2009
    17 Jun 2011
    Link to this post
    Sorry to revisit this so late, but after extracting these files into my project, which ItemListTemplate exactly do we need to be referencing in the control properties?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    17 Jun 2011
    Link to this post
    Hi ,

    When you open the control for editing, go it its Advanced Tab and find TempaltePaths properties section where you should find ItemListTemplatePath property.

    All the best,
    Ivan Dimitrov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  7. Duncan Evans
    Duncan Evans avatar
    122 posts
    Registered:
    07 Jul 2009
    17 Jun 2011
    Link to this post
    Right... Is that path: ~/Sitefinity/Admin/ControlTemplates/Libraries/Modes/GalleryLightboxList.ascx??

    Also is there a close button on this lightbox somewhere?
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    20 Jun 2011
    Link to this post
    Hello Duncan,

    Yes, this is the LightBox  template. There is a close button at the bottom right corner.

    Regards,
    Ivan Dimitrov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
8 posts, 0 answered