SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    May 2007
    Location
    West Coast
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Script - open new window not working

    it is on this fille - http://jsfiddle.net/codifier/3NBDf/

    Code:
    $(document).ready(function()
    {
        $(window).load(function () {
            site.init();
        });
    });
    
    $('.social-button').on('click', function()
            {
                window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;
            });
    Code:
    <div class="shareContainer">
                    <div class="shareIcons">
    <a class="social-button" href="http://www.linkedin.com/shareArticle?mini=true&url=http://www.yahoo.com&title=TITLE&summary=SUMMARY&source=Yahoo"><img src="http://3.bp.blogspot.com/-ZgsHmHmT7D8/Th8By9n-ZCI/AAAAAAAABbI/TBF9LxQ0Tv8/s1600/LinkedIn+Share+no+count+blogger+adding.png"></a>
                    </div>
                </div>
    
    Been pulling my hair for a while why it won;t work externally or within the html itself.

  2. #2
    SitePoint Addict
    Join Date
    May 2007
    Location
    West Coast
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure if it matters but would having

    jquery-1.6.2.min.js
    plain jquery.js script

    in the header affect it?

    These jquery scritps are necessary for the script to work.elements in the page to work. So, I don't want to change all the jquery just for some social buttons.

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,820
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Are you sure that you have your browser configured to allow a new window to be opened?
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Addict
    Join Date
    May 2007
    Location
    West Coast
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it is configured otherwise it would truly be embarrassing.

    The popup works on the buttons on this site

    Code:
    codesynthesis.co.uk/code-snippets/add-social-share-icons-without-javascript-requests


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •