a far oa distana far ofa distana far ofa distana far ofa distana far ofa distana distana far ofa far ofa distana far ofa distana distana far ofa distana far ofa distantftfttftffttftftftftff
 |
| ( June 28, 2012 ) |
Comments are filtered for language and registration is needed. The days makes no ensure of comments' actual accuracy. Readers might document beside the point feedback by clicking the Record Abuse hyperlink subsequent to a remark. Listed here are the entire
legal terms you settle to through the use of this remara far ofa distana far ofa distantftfk form.
';
shareDiv.innerHTML = templateHTML;
/* append the brand new div to the tip of the document, that is hidden already with CSS */
document.body.appendChild(shareDiv);
/* Retailer the div in each a normal JavaScript variable and as a jQuery item with the intention to reference them quicker later */
var shareTip = document.getElementById('shareTip'),
$shareTip = $('#shareTip');
/* This extends our settings item with any user-defined settings handed to the serve as and returns the jQuery item shareTip
was referred to as on */
return this.each(function()
if (choices)
$.extend(settings, options);
/* This can be a hack to verify the shareTip at all times fades again to ONE HUNDRED% opacity */
var checkOpacity = serve as ()A DISTANT
if (a distant $shareTip.css('opacity')a distant !== 1 )
$shareTip.css( 'opacity': 1 );THIRTEEN; THIRTEEN; ;
/* Serve as that replaces the HTML within the shareTip with the template we outlined on the best */
/* It'll wipe/reset the hyperlinks at the social media buttons on every occasion the serve as is known as */
var removeLinks = serve as ()A FAR OFF
shareTip.innerHTML = templateHTML;
;
/* That is the serve as that makes the hyperlinks for the Tweet /a distant Percentage capability */
var makeURLS = serve as (link, message)
/* Right here we assemble the Tweet URL the usage of an array, with values handed to the serve as */
var tweetConstruct = [
'http://twitter.com/share?url=', link, '&text=', message, '&via=', settings.twitter account
],
/* Then sign up for the array into one chew of HTML */THIRTEEN; tweetURL = tweetConstruct.join(''),
/* Related tale for Fb */THIRTEEN; fbConstruct = [THIRTEEN; 'http://www.facebook.com/sharer.php?u=', link, '&src=sp'
],
fbURL = fbConstruct.join(''),
newHTML = [
'' ], shareHTML = newHTML.join(''); /* Load in our new HTML */ shareTip.innerHTML = shareHTML; ; /* For the reason that shareTip will mechanically fade out while the person mouses out of a component */ /* we need to particularly inform the shareTip we would like it to stick placed whilst the person mouses over it */ /* This successfully offers the consumer a 500 ms (or no matter what) window to mouse */ /* from the component to the shareTip to stop it from coming out */ $shareTip.hover(serve as)( $shareTip.stop(true, true); $shareTip.show(); checkOpacity(); , serve as() $(this).fadeOut(settings.speed); ); /* This function handles the hover motion */ $(this).hover(function() /*A DISTANT cast off the vintage links, so any individual does not unintentionally click them */ removeLinks(); /* If there may be already an animation working at the shareTip, forestall it */ $shareTip.stop(true, true); var eso = $(this), message, /* Retailer the width and peak of the shareTip and the offset of the component for our calculations */A DISTANT peak = eso.height(), width = eso.width(), offset = eso.offset(), link; link = eso.children('a').attr('href'); message = break out( eso.find('img')a far off.attr('alt') ) || eso.attr(settings.message attr); if (hyperlink.search('http://') === -1) link = 'http://www.latimes.com' + hyperlink; hyperlink = encodeURIComponent(link); /* If it is on the best of the page, the shareTip will pop beneath the component */ if (offset.top
Read More... [Source: L.A. Times - Most E-mailed Stories]
No comments:
Post a Comment