Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi every body.
I have a problem . I will to create a photo gallery.for this I use jQuery Cycle Plugin.I download it jQuery form this
and add it to my .js files into Scripts folder.
this is my View in razor:
CSHTML
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link href="@Url.Content("~/Content/ftdLightBlue/styless.css")" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.cycle.all.js")" />
    <script type="text/javascript">
        $(function () {

            $('#pics').cycle({ fx: 'scrollDown',
                speed: 300, timeout: 2000
            });

        });
    </script>
</head>
<body>
    <div class="pics">
        <img alt="" src="/Content/Chapm.jpg" />
        <img src="/Content/e9wxteygkihq25wgvsi.jpg" alt="Champions of Europe" />
        <img src="/Content/1200.jpg" alt="Champions of Europe" />
    </div>
</body>
</html>


But when I run app I see this view it just show images. why this function not working?
thanks.
OK.
you can see JQuery here:http://malsup.github.io/jquery.cycle.all.js[^]
Posted
Updated 22-Apr-13 18:33pm
v4
Comments
db7uk 22-Apr-13 16:43pm    
what is firebug telling you?
StianSandberg 22-Apr-13 17:00pm    
You did not include jquery?

1 solution

your div has class with name pics but you are trying to access it by id you need to change it as:-


$('.pics').cycle({ fx: 'scrollDown',
speed: 300, timeout: 2000
});
 
Share this answer
 
Comments
♥…ЯҠ…♥ 29-Apr-13 6:50am    
It might work.... nice finding.
abbaspirmoradi 30-Apr-13 15:55pm    
thank you so much

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900