Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($slideNumber == 1) {
- $('#prev').attr("class", "not_active")
- $('#next').attr("class", "active")
- }
- else if ($slideNumber == divSum) {
- $('#next').attr("class", "not_active");
- $('#prev').attr("class", "active");
- }
- else {
- $('#prev').attr("class", "active")
- $('#next').attr("class", "active")
- };
- function setImageReelWidth () {
- //Get size of images, how many there are, then determin the size of the image reel.
- var divWidth = $(".window").width();
- var divSum = $(".slide").size();
- var divReelWidth = divWidth * divSum;
- //Adjust the image reel to its new size
- $(".image_reel").css({ 'width': divReelWidth });
- }
- // I like the more succinct:
- $(handler)
- // Instead of:
- $(document).ready(handler)
- function testFunction () {
- alert ('it works');
- }
- $(document).ready(function () {
- testFunction();
- // ... other code
- });
- if ($slideNumber == 1) {
- $('#prev').attr("class", "not_active")
- $('#next').attr("class", "active")
- }
- else if ($slideNumber == divSum) {
- $('#next').attr("class", "not_active");
- $('#prev').attr("class", "active");
- }
- else {
- $('#prev').attr("class", "active")
- $('#next').attr("class", "active")
- };
- $('#prev').attr("class", "not_active")
- $('#next').attr("class", "not_active")
- if ($slideNumber > 1)
- $('#prev').attr("class", "active")
- if ($slideNumber < divSum )
- $('#next').attr("class", "active")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement