Reddit Fixed Position Image Scroller

Developer
Size
2,258 Kb
Views
12,144

How do I make an reddit fixed position image scroller?

What is a reddit fixed position image scroller? How do you make a reddit fixed position image scroller? This script and codes were developed by Keegan Brown on 16 October 2022, Sunday.

Reddit Fixed Position Image Scroller Previews

Reddit Fixed Position Image Scroller - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Reddit Fixed Position Image Scroller</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <input id="feed" value="" placeholder="PS... Type a SWF Reddit like Space, Sky, Architecture, Weather" />
<div id="images">
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Reddit Fixed Position Image Scroller - Script Codes CSS Codes

body,html { height: 100%; width: 100%;
}
body { margin: 0; font-family: Helvetica, Arial, sans-serif; overflow: hidden;
}
#feed { font-size: 200%; margin:0; padding:0; border:0; width:100%; text-align:center;
}
#images { height:100%; overflow:scroll;
}
.img { display: block; width:100%; height:100%; float:left; overflow: hidden; position: relative; top:0; left:0;
}
.img span { position: absolute; top:0; height:100%; min-width:100%; display:block; background-size: cover; background-attachment: fixed;
}

Reddit Fixed Position Image Scroller - Script Codes JS Codes

function getFeed () {
var _theloc = document.getElementById("feed").value || 'earth';
var feedLoc = (_theloc + 'porn').toLowerCase();
$.getJSON("http://www.reddit.com/r/"+feedLoc+"/.json", function(data) { var blocks = []; $.each(data.data.children, function(i,item){ var url = item.data.url; if ( url.match('imgur') ) { //url += ".jpg"; } if ( !url.match('.jpg') ) { return; } blocks.push( '<div class="img"><span title="'+url+'" style="background-image:url('+ url +');"></span></div>' ); }); $('#images').html( blocks.join(' ') );
});
}
$('#feed').on('change', getFeed);
$(getFeed);
Reddit Fixed Position Image Scroller - Script Codes
Reddit Fixed Position Image Scroller - Script Codes
Home Page Home
Developer Keegan Brown
Username keeganbrown
Uploaded October 16, 2022
Rating 3
Size 2,258 Kb
Views 12,144
Do you need developer help for Reddit Fixed Position Image Scroller?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Keegan Brown (keeganbrown) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!