KILLSWITCH FREEBIE: StickNSlide jQuery plugin.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Killswitch
    REVOLUTIONARY
    • Oct 2012
    • 2573

    #1

    KILLSWITCH FREEBIE: StickNSlide jQuery plugin.

    Hello Ladies and Entleman.

    Today, I am sharing a little jQuery plugin I wrote, basically what it does is takes any element you attach it to, and makes it scroll with the window.

    Here's the plugin, just save it to a new file, and name it sticknslide.js and include it on your page like you normally would.

    Code:
    /**
    * StickNSlide
    *
    * Stick shit and watch it slide down your screen.
    * By Killswitch - http://www.pronemedia.com
    *
    */
    
    (function(e){e.fn.sticknslide=function(t){var n={fromTheTop:0};t=e.extend(n,t);var r=e(this);if(!r.length){return}var i=r.offset().top;var s=r.width()+"px";var o=e('<div class="sticknslide"></div>');var u=e(window);var a=e(document);u.scroll(function(){var e=u.scrollTop();if(e+t.fromTheTop+r.height()<a.height()-u.height()&&e+t.fromTheTop>r.offset().top){r.css({position:"fixed",width:s,top:t.fromTheTop+"px"});o.css({width:s,height:r.height()});r.before(o)}else if(e+t.fromTheTop<i){o.remove();r.css({position:"static",width:s,top:""})}})}})(jQuery)
    Then just attach it to whatever element you want to scroll with like so:

    Code:
    $('#myelement').sticknslide();
    Here's an example of it: http://jsfiddle.net/Killswitch/T37Tq/show/

    Hope you enjoy, and keep on keeping on hombres.
  • CyberHustler
    Masterbaiter
    • Feb 2006
    • 28736

    #2
    Aww man I was looking for something like this recently for sidebar ads. Thanks
    “If you can convince the lowest white man he’s better than the best colored man, he won’t notice you’re picking his pocket. Hell, give him somebody to look down on, and he’ll empty his pockets for you.”

    Comment

    • Killswitch
      REVOLUTIONARY
      • Oct 2012
      • 2573

      #3
      Originally posted by CyberHustler
      Aww man I was looking for something like this recently for sidebar ads. Thanks
      No problem bruh.

      Comment

      • brassmonkey
        Pay It Forward
        • Sep 2005
        • 77396

        #4
        can i get that tube scraper for free?? hit me up
        TRUMP 2026 KEKAW!!! - The Laken Riley Act Is Law!
        DACA ENDED - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com

        Comment

        • Killswitch
          REVOLUTIONARY
          • Oct 2012
          • 2573

          #5
          Originally posted by brassmonkey
          can i get that tube scraper for free?? hit me up
          If you're interested in it, I can hit you up, but it won't be for free.

          Comment

          • Supz
            Arthur Flegenheimer
            • Jul 2006
            • 11057

            #6
            Originally posted by Killswitch
            If you're interested in it, I can hit you up, but it won't be for free.
            he charges 2 reacharounds for this sweet piece of programming art.

            Comment

            • 2013
              So Fucking Banned
              • Dec 2012
              • 4390

              #7
              i hate poo

              Comment

              • Killswitch
                REVOLUTIONARY
                • Oct 2012
                • 2573

                #8
                Originally posted by Supz
                he charges 2 reacharounds for this sweet piece of programming art.
                That was specific to you... Why did you have to say that!

                Comment

                • Vapid - BANNED FOR LIFE
                  Barterer
                  • Aug 2004
                  • 4864

                  #9
                  Poo on you

                  Comment

                  • Supz
                    Arthur Flegenheimer
                    • Jul 2006
                    • 11057

                    #10
                    Originally posted by Killswitch
                    That was specific to you... Why did you have to say that!
                    Didnt know. I thought this was for everyone...

                    Comment

                    • Killswitch
                      REVOLUTIONARY
                      • Oct 2012
                      • 2573

                      #11
                      Originally posted by Monotony
                      Poo on you


                      Originally posted by Supz
                      Didnt know. I thought this was for everyone...
                      It's okay, shit happens when you party naked.

                      Comment

                      • Killswitch
                        REVOLUTIONARY
                        • Oct 2012
                        • 2573

                        #12
                        Thinking of starting a Freebie Friday where I'll create something small and give it away for free.

                        Comment

                        • georgeyw
                          58008 53773
                          • Jul 2005
                          • 9865

                          #13
                          Doesn't seem to work on tablets.
                          TripleXPrint on Megan Fox
                          "I would STILL suck her pussy until her face caved in. And then blow her up and do it again!"

                          Comment

                          • Killswitch
                            REVOLUTIONARY
                            • Oct 2012
                            • 2573

                            #14
                            Originally posted by georgeyw
                            Doesn't seem to work on tablets.
                            Never tested it on tablets.

                            Comment

                            • rogueteens
                              So fucking bland
                              • Jul 2006
                              • 8005

                              #15
                              Is it meant to stay in the middle of the screen? As it rolls to the top when you scroll down on my browser.
                              Free traffic and backlinks from one of the fastest growing adult pinsites on the net - SAUCY PICTURES!
                              Easily my best performing webcam sponsor - CLICK HERE!!

                              Comment

                              • Killswitch
                                REVOLUTIONARY
                                • Oct 2012
                                • 2573

                                #16
                                Originally posted by rogueteens
                                Is it meant to stay in the middle of the screen? As it rolls to the top when you scroll down on my browser.
                                On the example it does, otherwise it stays wherever you originally put the item until you start scrolling then it goes down.


                                Also I have made this to start the Friday Freebies. You can sign up and I'm gonna attempt to send out a new freebie like this one every Friday to users.

                                http://www.pronemedia.com/frifree

                                Comment

                                • Heath
                                  Confirmed User
                                  • Sep 2008
                                  • 491

                                  #17
                                  These dudes are legit. I had a clusterfuck of problems and they helped resolve it more quickly than ALL the people I hired before them.

                                  I am pleasantly surprised. The new site will be fully completed in the next few weeks.
                                  Email - popuplace [at] yahoo [dot] com

                                  Comment

                                  • Killswitch
                                    REVOLUTIONARY
                                    • Oct 2012
                                    • 2573

                                    #18
                                    Originally posted by Populace
                                    These dudes are legit. I had a clusterfuck of problems and they helped resolve it more quickly than ALL the people I hired before them.

                                    I am pleasantly surprised. The new site will be fully completed in the next few weeks.
                                    Thanks man, always a pleasure working with you.

                                    Comment

                                    Working...