Close lightbox on image click?

2 posts, 0 answers
  1. Kim
    Kim avatar
    10 posts
    Member since:
    Oct 2013

    Posted 20 Feb 2014 Link to this post

    Is it possible to close the light box, when the active image is clicked?

    And if so, how would I do that?

    regards Kim Hjort
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 Feb 2014 in reply to Kim Link to this post

    Hi Kim,

    Please have a look into the sample code snippet to close the RadLightBox on Image click.

    <telerik:RadButton ID="FeedbackButton" OnClientClicked="OpenFeedbackLightBox" AutoPostBack="false"
        Text="Share Your Feedback" Skin="Silk" runat="server" />
    <telerik:RadLightBox ID="FeedbackLightBox" runat="server" Width="400px" Height="350px"
        CssClass="lb_feedback" Modal="true">
            <AnimationSettings HideAnimation="Resize" NextAnimation="Fade" PrevAnimation="Fade"
                ShowAnimation="Resize" />
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/cb_go_empty.png" onclick="Close();" />

    <script type="text/javascript">
        function OpenFeedbackLightBox() {
            var lightBox = $find('<%= FeedbackLightBox.ClientID %>');
        function Close() {
            var lightBox = $find('<%= FeedbackLightBox.ClientID %>');

    Let me know if you have any concern.
  3. DevCraft R3 2016 release webinar banner
Back to Top