-
AuthorPosts
-
August 9, 2014 at 2:59 pm #302006
Hi –
II would like to add floating social share bookmarks like the one shown on your site below:
If you scroll down the page, a vertical bar of social icons appears on the left. Is this a plugin or a feature within the Enfold theme that I haven’t found yet?
Thanks
Rebecca- This topic was modified 10 years, 3 months ago by TownCouncil.
August 10, 2014 at 5:19 am #302156October 31, 2014 at 3:17 pm #344052Hi,
I’ve tried digg digg and I think it’s fab!
However, the bar acts strange in Chrome (at least on my mac, when refreshing the page, and paging through my blog posts). At kriesi.at I can’t reproduce this behaviour.I know you guys do not support 3rd party plugins (fair enough), but did you do anything with the code to solve the weird acting of the bar in Chrome on Mac?
Thnx in advance!
MarcOctober 31, 2014 at 3:43 pm #344069UPDATE: DIGG DIGG SOCIAL SHARE BAR ACTS WEIRD AT KRIESI.AT
========================================================I did some more testing in Chrome at kriesi.at to find out the bar behaves strange too…
Right now, I’m in a Windows environment, using Chrome 38.0.2125.111. When paging through the blog posts at kriesi.at and hit the CTRL-R buttons every now and then (to refresh the page), the social bar moves up quite a bit.
That’s the same kind of behaviour I had yesterday night in my Mac environment too (in Chrome).
October 31, 2014 at 5:45 pm #344192Hmm, found where the position can be set: in diggdigg-floating-bar.js
It seems Chrome cannot handle what’s happening injQuery(window).scroll(function ()
.I created a ‘workaround’ that’s fine for now (but I’m looking for a nicer solution).
Find this code:
if($floating_bar.length > 0) { var pullX = $floating_bar.css('margin-left'); jQuery(window).scroll(function () { var scroll_from_top = jQuery(window).scrollTop() + 70; var is_fixed = $dd_outer.css('position') == 'fixed'; if($dd_end.length){ var dd_ajax_float_bottom = dd_end - ($floating_bar.height() + 70); } if($floating_bar.length > 0) { if(scroll_from_top > dd_ajax_float_bottom && $dd_end.length){ dd_position_floating_bar(dd_ajax_float_bottom, dd_left); $dd_outer.css('position', 'absolute'); } else if ( scroll_from_top > dd_top && !is_fixed ) { dd_position_floating_bar(70, dd_left); $dd_outer.css('position', 'fixed'); } else if ( scroll_from_top < dd_top && is_fixed ) { dd_position_floating_bar(dd_top, dd_left); $dd_outer.css('position', 'absolute'); } } }); }
And replace it with something like this:
if(($floating_bar.length > 0) && (navigator.userAgent.search("Chrome") < 0)) { var pullX = $floating_bar.css('margin-left'); jQuery(window).scroll(function () { var scroll_from_top = jQuery(window).scrollTop() + 70; var is_fixed = $dd_outer.css('position') == 'fixed'; if($dd_end.length){ var dd_ajax_float_bottom = dd_end - ($floating_bar.height() + 70); } if($floating_bar.length > 0) { if(scroll_from_top > dd_ajax_float_bottom && $dd_end.length){ dd_position_floating_bar(dd_ajax_float_bottom, dd_left); $dd_outer.css('position', 'absolute'); } else if ( scroll_from_top > dd_top && !is_fixed ) { dd_position_floating_bar(70, dd_left); $dd_outer.css('position', 'fixed'); } else if ( scroll_from_top < dd_top && is_fixed ) { dd_position_floating_bar(dd_top, dd_left); $dd_outer.css('position', 'absolute'); } } }); } if(($floating_bar.length > 0) && (navigator.userAgent.search("Chrome") >= 0)) { dd_position_floating_bar(550, dd_left); $dd_outer.css('position', 'fixed'); }
As said: this is fine for now, but I’m trying and look for something better ;-)
-
AuthorPosts
- The topic ‘Floating social share bookmarks’ is closed to new replies.