GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   KILLSWITCH FREEBIE: StickNSlide jQuery plugin. (https://gfy.com/showthread.php?t=1097606)

Killswitch 01-25-2013 02:33 PM

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. :thumbsup

CyberHustler 01-25-2013 02:36 PM

Aww man I was looking for something like this recently for sidebar ads. Thanks :thumbsup

Killswitch 01-25-2013 02:37 PM

Quote:

Originally Posted by CyberHustler (Post 19444213)
Aww man I was looking for something like this recently for sidebar ads. Thanks :thumbsup

No problem bruh. :thumbsup

brassmonkey 01-25-2013 02:43 PM

can i get that tube scraper for free?? :) hit me up

Killswitch 01-25-2013 02:44 PM

Quote:

Originally Posted by brassmonkey (Post 19444233)
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. :2 cents:

Supz 01-25-2013 02:53 PM

Quote:

Originally Posted by Killswitch (Post 19444234)
If you're interested in it, I can hit you up, but it won't be for free. :2 cents:

he charges 2 reacharounds for this sweet piece of programming art.

2013 01-25-2013 02:57 PM

i hate poo

Killswitch 01-25-2013 03:10 PM

Quote:

Originally Posted by Supz (Post 19444251)
he charges 2 reacharounds for this sweet piece of programming art.

That was specific to you... Why did you have to say that! :mad:

Vapid - BANNED FOR LIFE 01-25-2013 03:50 PM

Poo on you

Supz 01-25-2013 03:56 PM

Quote:

Originally Posted by Killswitch (Post 19444276)
That was specific to you... Why did you have to say that! :mad:

Didnt know. I thought this was for everyone...

Killswitch 01-25-2013 03:58 PM

Quote:

Originally Posted by Monotony (Post 19444363)
Poo on you

http://i.imgur.com/bIs9nbf.gif

Quote:

Originally Posted by Supz (Post 19444375)
Didnt know. I thought this was for everyone...

It's okay, shit happens when you party naked.

Killswitch 01-25-2013 04:10 PM

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

georgeyw 01-25-2013 04:53 PM

Doesn't seem to work on tablets.

Killswitch 01-25-2013 04:56 PM

Quote:

Originally Posted by georgeyw (Post 19444449)
Doesn't seem to work on tablets.

Never tested it on tablets.

rogueteens 01-25-2013 06:30 PM

Is it meant to stay in the middle of the screen? As it rolls to the top when you scroll down on my browser.

Killswitch 01-25-2013 06:34 PM

Quote:

Originally Posted by rogueteens (Post 19444589)
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 :thumbsup

Heath 01-25-2013 07:04 PM

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.

Killswitch 01-25-2013 07:08 PM

Quote:

Originally Posted by Populace (Post 19444634)
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. :thumbsup


All times are GMT -7. The time now is 01:51 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123