Jump to content

Luciana

Recommended Posts

Guys, good morning.
I am looking for a long time this helps, I found this forum and hope I succeed in this quest is the following, http://studioplanoverde.com.br/site/ this link, or by clicking the PORTFOLIO menu, it goes to down in the page itself and show some pictures, and when you click on top of the image, it opens, it opens only remaining on the page itself, what I need and MUCH, is that when you open the image, it may rise slightly, why is paying attention, the image opens but gets half of the page, then you have to go down a little scroll rod.
I finally found the file for this purpose, at first, seems a bit messy, but that's the way it is in the file, I'll post here.
Since now, and very grateful for the attention and mostly anyone who can help me.
/* Dynamic Window Ajax Portfolio Content */"use strict";(function($) {var $actual= null;var obert=false;$(".ch-grid").click(function() {obre($(this).attr('id'));$actual=$(this);});$(".folio-btn").click(function() {$(".project-window").slideUp("slow");obert=false;});//obre('portfolio-1.html',1);function obre(quin, dummy){$.ajax({url: quin,success: function(data) {$('.project-content').html(data);$(".project-content").hide(0)$('.project-window').hide(0)tanca();canvia();worksCarousel();if(dummy!=1){// if(obert!=true){$("html, body").animate({ scrollTop: $('#portfolio').offset().top }, 500, function(){$('.project-window').show(0);$('.project-window').animate({height:900}, 500,function(){$('.project-window').css('height','auto');// $(".project-window").slideDown(1500, function() {$(".project-content").fadeIn("slow");});});/* }else{$("html, body").animate({ scrollTop: $('#anchor5').offset().top }, 300, function(){$('.project-window').show(0);$(".project-content").fadeIn("slow");});}obert=true; */}}});}function tanca(){$(".close").click(function() {$('#portfolio').slideUp("slow");$('#portfolio').animate({ scrollTop: $('#portfolio').offset().top });obert=false;});}function seguent(){if($actual.next().hasClass('final')){$actual=$($('.inici').next());}else{$actual=$($actual.next());}if($actual.hasClass('isotope-hidden')){seguent();}else{obre($actual.attr('id'));}}function enrera(){if($actual.prev().hasClass('inici')){$actual=$($('.final').prev());}else{$actual=$($actual.prev());}if($actual.hasClass('isotope-hidden')){enrera();}else{obre($actual.attr('id'));}}function canvia(){$('.btn-next').click(function() {seguent();$("html, body").animate({ scrollTop: $('#project-show').offset().top }, 1000);});$('.btn-prev').click(function() {enrera();$("html, body").animate({ scrollTop: $('#project-show').offset().top }, 1000);});}// Carousel Project Openedfunction worksCarousel(){var totalWorks = $(".wrapper-project ul li").length;var ampleWork = $(".project-content").width();var ampleTotalWorks = totalWorks*ampleWork;$('.wrapper-project ul').css('width',ampleTotalWorks)$("html, body").animate({ scrollTop: $('#project-show').offset().top }, 1);var fragment = document.createDocumentFragment(),li = document.createElement('li');while (totalWorks--) {fragment.appendChild(li.cloneNode(true));}$('.controller-3 ul').append(fragment);var index3 = 0;var pos3 = 10;$('.controller-3 ul li:first-child').addClass('selected');$(".controller-3 ul li").click(function(){index3 = $(this).index();$(".wrapper-project").stop().animate({scrollLeft:ampleWork*index3},'slow');$('.controller-3 ul li').removeClass('selected');$(this).addClass('selected');//alert(ampleitem);});$(".w-next").click(function(){if( index3 != $(".controller-3 ul li").size()-1){ index3++; $(".wrapper-project").stop().animate({scrollLeft:ampleWork*index3},'slow'); pos3++; $('.controller-3 ul li.selected').removeClass('selected').next().addClass('selected');} });$(".w-prev").click(function(){ if( index3!=0 ){ index3--; $(".wrapper-project").animate({scrollLeft:ampleWork*index3},'slow'); pos3--; $('.controller-3 ul li.selected').removeClass('selected').prev().addClass('selected'); }});}})(jQuery);
Link to comment
Share on other sites

If you want it to scroll so that the picture is on the top, then you'll need to find the part that does that scrolling (I see several calls to scrollTop there, I'm not sure which one it is) and have it scroll to the element that contains the picture. It looks like the picture is inside a div with the class wrapper_project.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...