use deletage instead of live; bind where we don't need to delegate
This commit is contained in:
parent
9b057bdf16
commit
51c7e879de
2 changed files with 6 additions and 7 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$(".like_action.inactive").live('tap click', function(evt){
|
$(".stream").delegate(".like_action.inactive", "tap click", function(evt){
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var link = $(this),
|
var link = $(this),
|
||||||
likeCounter = $(this).closest(".stream_element").find("like_count"),
|
likeCounter = $(this).closest(".stream_element").find("like_count"),
|
||||||
|
|
@ -26,7 +26,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".like_action.active").live('tap click', function(evt){
|
$(".stream").delegate(".like_action.active", "tap click", function(evt){
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var link = $(this);
|
var link = $(this);
|
||||||
likeCounter = $(this).closest(".stream_element").find("like_count");
|
likeCounter = $(this).closest(".stream_element").find("like_count");
|
||||||
|
|
@ -52,7 +52,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("a.show_comments").live('tap click', function(evt){
|
$("a.show_comments").bind("tap click", function(evt){
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var link = $(this),
|
var link = $(this),
|
||||||
parent = link.closest(".bottom_bar").first(),
|
parent = link.closest(".bottom_bar").first(),
|
||||||
|
|
@ -77,7 +77,7 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("a.comment_action").live('tap click', function(evt){
|
$(".stream").delegate("a.comment_action", "tap click", function(evt){
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var link = $(this);
|
var link = $(this);
|
||||||
|
|
||||||
|
|
@ -108,7 +108,7 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("a.cancel_new_comment").live('tap click', function(evt){
|
$(".stream").delegate("a.cancel_new_comment", "tap click", function(evt){
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var link = $(this);
|
var link = $(this);
|
||||||
form = link.closest("form"),
|
form = link.closest("form"),
|
||||||
|
|
@ -134,7 +134,6 @@ $(document).ready(function(){
|
||||||
form.remove();
|
form.remove();
|
||||||
container.show();
|
container.show();
|
||||||
}, 'html');
|
}, 'html');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -489,7 +489,7 @@ input[type=submit] {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-size: larger;
|
font-size: larger;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
top: 38px;
|
top: 36px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
span {
|
span {
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue