Палсеич— (lusever) wrote in changelog,
Палсеич—
lusever
changelog

[livejournal] r16164: LJSV-919: Page is not reloaded when subs...

Committer: pkornilov
LJSV-919: Page is not reloaded when subscription tracking is removed.
U   trunk/htdocs/js/esn.js
Modified: trunk/htdocs/js/esn.js
===================================================================
--- trunk/htdocs/js/esn.js	2010-01-28 10:32:36 UTC (rev 16163)
+++ trunk/htdocs/js/esn.js	2010-01-28 10:50:11 UTC (rev 16164)
@@ -383,23 +383,19 @@
     btn.src = Site.imgprefix + uri;
 };
 
-jQuery(function($)
+jQuery(document).click(function(e)
 {
-    $(document).click(function(e)
-    {
-        var target = $(e.target),
-            parents = target.parents('a[class*=delete-group-]');
-
-        if (!parents.length) return;
-        
-        e.preventDefault();
-
-        var group = parents.attr('class').replace(/^delete-group-/, '');
-        $.post(location.href, {
-            delete_group : group
-        }, function()
-        {
-            parents.parents('tr').remove();
-        });
-    });
+	var parents = jQuery(e.target).parents('a[class*=delete-group-]');
+	
+	if (!parents.length) return;
+	
+	var group = parents.attr('class').replace(/^delete-group-/, '');
+	jQuery.post(location.href, {
+		delete_group : group
+	}, function()
+	{
+		parents.parents('tr').eq(0).remove();
+	});
+	
+	e.preventDefault();
 });

Tags: js, livejournal, lusever
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments