Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 27, 2012 09:06 PM by sg48asp
Member
322 Points
475 Posts
May 27, 2012 05:10 PM|LINK
Using fancybox 2, I want images to slide horizontally when I click next but they are sliding vertically. Would appreciate assistance. Thanks
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Photos.aspx.vb" Inherits="Photos" %> <asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server"> <script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script> <script src="lib/jquery.mousewheel-3.0.6.pack.js" type="text/javascript"></script> <link href="source/jquery.fancybox.css" rel="stylesheet" type="text/css" /> <script src="source/jquery.fancybox.pack.js" type="text/javascript"></script> <script src="source/jquery.fancybox.js" type="text/javascript"></script> <style type="text/css"> .uibtn:hover{ cursor:pointer;} </style> <script type="text/javascript"> $(document).ready(function () { $("a[rel=example_group]").trigger('click'); $("a[rel=example_group]").fancybox({ 'transitionIn' : 'none', 'transitionOut': 'none', 'titlePosition': 'over', 'titleFormat': function (title, currentArray, currentIndex, currentOpts) { return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>'; } }); }); </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_Main" Runat="Server"> <div> <asp:datalist id="dtl1" runat="server" RepeatDirection="Horizontal" RepeatColumns="5" RepeatLayout="Table" > <ItemTemplate> <a rel="example_group" href='<%# "images/photos/" & _ Eval("Filename") & "_b." & Eval("Ext") & "?" & datetime.now.ticks.tostring %>' title='<%#Eval("Title")%>'> <img alt=" " src='<%# "images/photos/" & Eval("Filename") & "_s." & Eval("Ext") & "?" & datetime.now.ticks.tostring %>' /></a> </ItemTemplate> </asp:datalist> </div> <div class="clear"></div> </asp:Content>
Star
8841 Points
1701 Posts
May 27, 2012 06:53 PM|LINK
I have done it (Horizontal) with a Repeater in instead
http://jquerytools.org/demos/scrollable/index.html
May 27, 2012 08:24 PM|LINK
Hi,
It doesn't seem like your solution has to do with fancybox.
The code I am using with a datalist is basically the same that I used on another project with an earlier version of fancybox and there the images slid horizontally.
May 27, 2012 08:38 PM|LINK
Maybe is the transition effect you are using
May 27, 2012 09:06 PM|LINK
No,
The transition options are: 'elastic', 'fade' or 'none'
I am using the same code from previous project where picturesslid horizontally.
sg48asp
Member
322 Points
475 Posts
How to make fancybox images slide horizontally instead of vertically.
May 27, 2012 05:10 PM|LINK
Using fancybox 2, I want images to slide horizontally when I click next but they are sliding vertically. Would appreciate assistance. Thanks
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Photos.aspx.vb" Inherits="Photos" %> <asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server"> <script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script> <script src="lib/jquery.mousewheel-3.0.6.pack.js" type="text/javascript"></script> <link href="source/jquery.fancybox.css" rel="stylesheet" type="text/css" /> <script src="source/jquery.fancybox.pack.js" type="text/javascript"></script> <script src="source/jquery.fancybox.js" type="text/javascript"></script> <style type="text/css"> .uibtn:hover{ cursor:pointer;} </style> <script type="text/javascript"> $(document).ready(function () { $("a[rel=example_group]").trigger('click'); $("a[rel=example_group]").fancybox({ 'transitionIn' : 'none', 'transitionOut': 'none', 'titlePosition': 'over', 'titleFormat': function (title, currentArray, currentIndex, currentOpts) { return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>'; } }); }); </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_Main" Runat="Server"> <div> <asp:datalist id="dtl1" runat="server" RepeatDirection="Horizontal" RepeatColumns="5" RepeatLayout="Table" > <ItemTemplate> <a rel="example_group" href='<%# "images/photos/" & _ Eval("Filename") & "_b." & Eval("Ext") & "?" & datetime.now.ticks.tostring %>' title='<%#Eval("Title")%>'> <img alt=" " src='<%# "images/photos/" & Eval("Filename") & "_s." & Eval("Ext") & "?" & datetime.now.ticks.tostring %>' /></a> </ItemTemplate> </asp:datalist> </div> <div class="clear"></div> </asp:Content>Primillo
Star
8841 Points
1701 Posts
Re: How to make fancybox images slide horizontally instead of vertically.
May 27, 2012 06:53 PM|LINK
I have done it (Horizontal) with a Repeater in instead
http://jquerytools.org/demos/scrollable/index.html
Primillo
http://www.facebook.com/programandopuntonet
sg48asp
Member
322 Points
475 Posts
Re: How to make fancybox images slide horizontally instead of vertically.
May 27, 2012 08:24 PM|LINK
Hi,
It doesn't seem like your solution has to do with fancybox.
The code I am using with a datalist is basically the same that I used
on another project with an earlier
version of fancybox and there the images slid horizontally.
Primillo
Star
8841 Points
1701 Posts
Re: How to make fancybox images slide horizontally instead of vertically.
May 27, 2012 08:38 PM|LINK
Maybe is the transition effect you are using
Primillo
http://www.facebook.com/programandopuntonet
sg48asp
Member
322 Points
475 Posts
Re: How to make fancybox images slide horizontally instead of vertically.
May 27, 2012 09:06 PM|LINK
No,
The transition options are: 'elastic', 'fade' or 'none'
I am using the same code from previous project where picturesslid horizontally.