Skip to content

Commit d62cce0

Browse files
committed
Correção no plugin de modal
1 parent f1e1951 commit d62cce0

File tree

2 files changed

+16
-26
lines changed

2 files changed

+16
-26
lines changed

_site/public/scripts/plugins.js

+8-13
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,22 @@
2121
}
2222
$(document).keyup(function(e){
2323
if(e.which == 27){
24-
alert("ha!");
2524
$("#floater").fadeOut(300, function(){
2625
$("#floater-overlay").fadeOut(200);
2726
});
2827
}
2928
});
3029
$(this).click(function(){
31-
var rel = $(this).attr("rel");
32-
var href = $(this).attr("href");
30+
var rel = $(this).attr("rel"),
31+
href = $(this).parent().find("ul:first").html();
3332
if(rel != ""){
3433
$("#floater").removeClass().addClass(rel);
3534
$("#floater .frame").html("");
3635
$("#floater-overlay").fadeIn(300,function(){
3736
$("#floater").fadeIn(800,function(){
38-
$.ajax({
39-
url: href,
40-
dataType: "html",
41-
success: function(project){
42-
$("#floater .frame").html(project);
43-
$("#floater .frame").fadeIn(300);
37+
$("#floater .frame").html("<ul>" + href + "</ul>");
38+
39+
$("#floater .frame").fadeIn(300, function(){
4440

4541
if(parseInt($(document).width()) < 770){
4642
$("#floater .frame ul li").css({width:parseInt($(document).width())});
@@ -65,10 +61,9 @@
6561
},
6662
threshold:0
6763
});
68-
69-
}
70-
});
71-
});
64+
65+
});
66+
});
7267
});
7368
}
7469
return false;

public/scripts/plugins.js

+8-13
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,22 @@
2121
}
2222
$(document).keyup(function(e){
2323
if(e.which == 27){
24-
alert("ha!");
2524
$("#floater").fadeOut(300, function(){
2625
$("#floater-overlay").fadeOut(200);
2726
});
2827
}
2928
});
3029
$(this).click(function(){
31-
var rel = $(this).attr("rel");
32-
var href = $(this).attr("href");
30+
var rel = $(this).attr("rel"),
31+
href = $(this).parent().find("ul:first").html();
3332
if(rel != ""){
3433
$("#floater").removeClass().addClass(rel);
3534
$("#floater .frame").html("");
3635
$("#floater-overlay").fadeIn(300,function(){
3736
$("#floater").fadeIn(800,function(){
38-
$.ajax({
39-
url: href,
40-
dataType: "html",
41-
success: function(project){
42-
$("#floater .frame").html(project);
43-
$("#floater .frame").fadeIn(300);
37+
$("#floater .frame").html("<ul>" + href + "</ul>");
38+
39+
$("#floater .frame").fadeIn(300, function(){
4440

4541
if(parseInt($(document).width()) < 770){
4642
$("#floater .frame ul li").css({width:parseInt($(document).width())});
@@ -65,10 +61,9 @@
6561
},
6662
threshold:0
6763
});
68-
69-
}
70-
});
71-
});
64+
65+
});
66+
});
7267
});
7368
}
7469
return false;

0 commit comments

Comments
 (0)