Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- $('a.next').click(function() {
- var cur_left = $('#thumb_container').css('left');
- var next_left = parseInt(cur_left) - parseInt(520);
- var width = $('#thumb_container').css('width');
- if(next_left < '-' + width.substr(0,3)) {
- return false;
- } else {
- $('#thumb_container').animate({left:next_left + 'px'}, {queue:false, duration:300});
- return false;
- };
- });
- $('a.prev').click(function() {
- var cur_left = $('#thumb_container').css('left');
- var next_left = parseInt(cur_left) + parseInt(520);
- var width = $('#thumb_container').css('width');
- if(next_left >= width.substr(0,3)) {
- return false;
- } else {
- $('#thumb_container').animate({left:next_left + 'px'}, {queue:false, duration:300});
- return false;
- };
- });
- $('.thumb').click(function() {
- var pos = $(this).attr('rel');
- $('#project_cont').animate({left:'-' + pos + 'px'}, {queue:false, duration:300});
- return false;
- });
- $('.thumbnail').click(function() {
- var img = $(this).attr('href');
- $(this).parent().parent().parent().parent().fadeOut('slow',function() {
- $(this).css('background-image', 'url(' + img + ')');
- $(this).fadeIn('slow');
- });
- return false;
- });
- $('.project_info').css('top', '370px');
- $('.project_info').hover(function() {
- if($(this).is(':not(:animated)')) {
- $(this).animate({top: '180px'});
- $(this).css('cursor', 'pointer');
- } else {
- return false;
- };
- }, function() {
- if($(this).is(':not(:animated)')) {
- $(this).animate({top: '370px'});
- } else {
- return false;
- };
- });
- });
Add Comment
Please, Sign In to add comment