Senior & Expert RoR Developers Discussion Forum by Nyros Technologies

HIRE Ruby on Rails Expert Developers Programmers Coders From India
Ruby on Rails PHP .Net Developers Community, Nyros Technologies, Kakinada
 
Log in  or IF not a member please REGISTER
Username:
Password:   


Keyword
Log in | Profile 

Image scrolling using jquery

 
Post new topic   Reply to topic    Senior & Expert RoR Developers Discussion Forum by Nyros Technologies Index -> Integrating AJAX & RJS and JQuery in ruby on rails applications (Ajaxified rails programming)
View previous topic :: View next topic  
Author Message
swaminadhan



Joined: 14 Sep 2009
Posts: 84

PostPosted: Thu Jul 01, 2010 1:44 pm    Post subject: Image scrolling using jquery Reply with quote

Hi friends !

Normally we do have some instances to scroll multiple images. here is one way to keep the scrolling options of images using jquery.

In views add

<script>
<script src="/javascripts/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="/javascripts/jquery.slideviewer.1.2.js" type="text/javascript"></script>

<script type="text/javascript">
$(window).bind("load", function()
{ $("div#mygaltwo").slideView({ easeFunc: "easeInOutBack", easeTime: 1200 }); });
</script>


From the above script we need to provide the div(mygaltwo) of the images and the slideview is the method presented in the above js files.




<style type="text/css">
/*preload classes*/ .svw {width: 50px; height: 20px; background: #fff;} .svw ul {position: relative; left: -999em;} /*core classes*/ .stripViewer { position: relative; overflow: hidden; border: 5px solid #ff0000; margin: 0 0 1px 0; } .stripViewer ul { /* this is your UL of images */ margin: 0; padding: 0; position: relative; left: 0; top: 0; width: 1%; list-style-type: none; } .stripViewer ul li { float:left; } .stripTransmitter { overflow: auto; width: 1%; } .stripTransmitter ul { margin: 0; padding: 0; position: relative; list-style-type: none; } .stripTransmitter ul li{ width: 20px; float:left; margin: 0 1px 1px 0; } .stripTransmitter a{ font: bold 10px Verdana, Arial; text-align: center; line-height: 22px; background: #ff0000; color: #fff; text-decoration: none; display: block; } .stripTransmitter a:hover, a.current{ background: #fff; color: #ff0000; } /*tooltips formatting*/ .tooltip { padding: 0.5em; background: #fff; color: #000; border: 5px solid #dedede; }

</style>


The above script is the our style of the div. Here we can write styles according to our requirement.But in the above beside the preload classes we need to provide the class name which is supposed to be invoked.


In the above example the "svw " is the class name




<div id="mygaltwo" class="svw">

<ul> <li><img width="350" height="200" alt="abc" src="/images/sarma_images/3.jpg" /></li>

<li><img width="350" height="200" alt="defrg" src="/images/sarma_images/4.jpg" /></li>

<!-- eccetera --> </ul>
</div>



Note: If any problem occured, then once disable the "defaults.js" and check it once

Thank you
swaminadhan.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Senior & Expert RoR Developers Discussion Forum by Nyros Technologies Index -> Integrating AJAX & RJS and JQuery in ruby on rails applications (Ajaxified rails programming)
Page 1 of 1

 latest topics 
 Topics   Replies   Author   Views   Last Post 
No new posts How to customize Google Maps InfoWindow using ym4r_gm
0 kalyanallampalli 49 Thu Sep 02, 2010 5:34 pm
kalyanallampalli View latest post
No new posts Drag and Drop file upload
0 umamageshwari 45 Wed Sep 01, 2010 9:36 am
umamageshwari View latest post
No new posts Flex On Rails
0 Raghu 45 Wed Sep 01, 2010 3:00 am
Raghu View latest post
No new posts MongoDB
0 Raghu 44 Tue Aug 31, 2010 3:30 pm
Raghu View latest post
No new posts Problem with Dreamweaver / java error
3 Raja 36 Tue Aug 31, 2010 3:24 pm
Raghu View latest post
No new posts Generating Model
0 phani.galla 43 Tue Aug 31, 2010 2:09 pm
phani.galla View latest post
No new posts Hide Panels using JQuery
0 Anu 46 Tue Aug 31, 2010 1:50 pm
Anu View latest post
No new posts Load a text file using ajax in jquery
0 Anu 35 Tue Aug 31, 2010 1:39 pm
Anu View latest post
No new posts Generating Migrations
0 phani.galla 29 Tue Aug 31, 2010 1:38 pm
phani.galla View latest post
No new posts Generating Controllers
0 phani.galla 31 Tue Aug 31, 2010 1:22 pm
phani.galla View latest post




Hire an expert Ruby on Rails developer / coder / programmer or development team from India now!!

Other Forums : PHP   ::   .Net   |   Free unlimited HTML CSS templates download

Nyros Technologies   |   Kakinada City Portal   |   Developers Blog   |   About Ruby on Rails Experts   |   More