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

[livejournal] r19037: LJSUP-8770: Doesn't work plus-button for...

Committer: pkornilov
LJSUP-8770: Doesn't work plus-button for sharing
U   trunk/htdocs/js/share.js
Modified: trunk/htdocs/js/share.js
===================================================================
--- trunk/htdocs/js/share.js	2011-05-06 06:52:12 UTC (rev 19036)
+++ trunk/htdocs/js/share.js	2011-05-06 09:06:45 UTC (rev 19037)
@@ -167,14 +167,15 @@
 * @param String|Node|Jquery collection Node the popup has to be attached to. Default id a:last
 */
 window.LJShare.link = function( opts, node ) {
-	var link = node || jQuery( 'a:last' ),
-		linkImg = link.find('img'),
-		url = link.attr( 'href' ),
-		options = prepareOptions( jQuery.extend( {}, { url: url } , opts ) ),
-		dom, bubble, skipCloseEvent;
-		
-	link = (linkImg.length) ? linkImg : link;		
+	var a = node || $( 'a:last' ),
+		linkImg = a.find( 'img' ),
+		link = (linkImg.length) ? linkImg : a,
+		url = a.attr( 'href' ),
+		options = prepareOptions( $.extend( {}, { url: url } , opts ) ),
+		dom;
 
+	a.attr( 'href', 'javascript:void(0)' );
+
 	var links = ( opts.links ) ? opts.links : global_options.links;
 
 	function buildDom() {
@@ -226,15 +227,14 @@
 		} );
 	}
 
-	link.attr( 'href', 'javascript:void(0)' )
-		.one( 'click', function( ev ) {
-			ev.stopPropagation();
-			
-			if( !dom ) {
-				buildDom();
-				bindControls();
-			}
-		} );
+	link.one( 'click', function( ev ) {
+		ev.stopPropagation();
+		
+		if( !dom ) {
+			buildDom();
+			bindControls();
+		}
+	} );
 
 	return this;
 };

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