|
@@ -100,7 +100,6 @@ function click_list() {
|
|
|
$('.card a').click(function (e) {
|
|
|
e.preventDefault()
|
|
|
})
|
|
|
-
|
|
|
click_img(e, $this, $href, url, page, cat, project_name)
|
|
|
},
|
|
|
complete: function(data) {
|
|
@@ -175,6 +174,7 @@ function click_img(e, $this, $href, url, page, cat, project_name) {
|
|
|
|
|
|
closeAjax();
|
|
|
$loader.hide();
|
|
|
+ scrollTop();
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -198,6 +198,7 @@ function animate() {
|
|
|
function marg_item(project_name) {
|
|
|
|
|
|
var $item = $('.card-image#'+project_name+' #item');
|
|
|
+
|
|
|
var $item_offset = $item.offset().left-8;
|
|
|
var $card = $item.parents('.card');
|
|
|
|
|
@@ -206,13 +207,36 @@ function marg_item(project_name) {
|
|
|
|
|
|
var margin_right = $item_list.width() - (pos_card + $card.width());
|
|
|
|
|
|
- console.log('$card.width()',$card.width());
|
|
|
- console.log('pos_card',pos_card);
|
|
|
-
|
|
|
- console.log('$item_list',$item_list.width());
|
|
|
-
|
|
|
$item.css('margin-left', '-'+$item_offset +'px');
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function mouseHover() {
|
|
@@ -302,6 +326,14 @@ function croix() {
|
|
|
$link.append(loader);
|
|
|
}
|
|
|
|
|
|
+function scrollTop() {
|
|
|
+ var $body = $("html, body");
|
|
|
+ $('#item #top').click(function() {
|
|
|
+ $body.stop().animate({scrollTop:0}, 500, 'swing', function() {
|
|
|
+ });
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
$(document).ready(function($){
|
|
|
|
|
|
click_link();
|