How to give responsive design to social media buttons

This topic contains 1 reply, has 1 voice, and was last updated by  admin February 21, 2017 at 8:55 am.

  • Creator
    Topic
  • #5060

    admin
    Keymaster

    Responsive design for social media button

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #5062
    Helpful
    Up
    1
    Down
    Not Helpful

    admin
    Keymaster

    Place this JavaScript code just before the tag at the end of your page:
    var isMobile = {
    Android: function() { return navigator.userAgent.match(/Android/i); },
    BlackBerry: function() { return navigator.userAgent.match(/BlackBerry/i); },
    iOS: function() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); },
    Opera: function() { return navigator.userAgent.match(/Opera Mini/i); },
    Windows: function() { return navigator.userAgent.match(/IEMobile/i); },
    any: function() { return (isMobile.Android() || isMobile.BlackBerry() ||
    isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); }
    };
    if (! isMobile.any() ) {
    document.write(“<table align=’center’ cellpadding=’1′ cellspacing=’1′ width=’184’>”);
    document.write(” <tr>”);
    document.write(” <td height=’34’ width=’180’>”);
    document.write(” <div class=’addthis_toolbox addthis_default_style addthis_32x32_style’>”);
    document.write(” <a class=’addthis_button_preferred_1’></a>
    <a class=’addthis_button_preferred_2’></a> <a class=’addthis_button_preferred_3’></a>”);
    document.write(” <a class=’addthis_counter addthis_bubble_style’></a>”);
    document.write(” </div>”);
    var a = document.createElement(“script”);
    a.src = “http://s7.addthis.com/js/250/addthis_widget.js#pubid=<your AddThis Publisher ID>”;
    document.body.appendChild(a);
    document.write(” </td>”);
    document.write(” </tr>”);
    document.write(” </table>”);
    document.write(“<div class=’e’></div>”);
    }

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.