javascript - Using Instafeed and SimplyScroll Together -
attempting use simplyscroll scroll instagram images, can't determine proper html markup 2 scripts function together.
i'm super novice web designer, , i've done days of research in trying work out correct javascript html these 2 scripts working together, no avail. assistance, or direction resources appreciated!
best can understand, correct method create target id instafeed html , simplyscroll calls source images.
closest i've gotten far below.
<script type="text/javascript"> var feed = new instafeed({ get: 'user', target: 'instagram_list', userid: xxxxxxxxxxx, limit: 15, accesstoken: 'xxxxxxxxxxxxxxxxxxxxxx, resolution: 'thumbnail', after: function() { $("#instagram_list").simplyscroll({ speed: 1, framerate: 20, orientation: 'horizontal', direction: 'forwards', customclass: 'instagram_scroller' }); } }); (jquery); feed.run(); </script> <div id="instagram_list" class="simply-scroll-clip"> </div>
in example, instafeed loads images, not styled , not scroll. if user reloads page (not refresh, instead selects url in browser , hits enter) works intended.
i'm stumped on how , why works on page reload only.
link semi-working page below
i had fiddle around bit working, i've put on site did friend, can have if helps (http://www.zervasandpepper.com - warning, plays music when load it!) still want tweak bit e.g. prevent row overlapping when loading work intended.
i imported required scripts, including simplyscroll javascript, instafeed javascript , simplyscroll css.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"> </script> <script type="text/javascript" src="../scripts/plugins/jquery.simplyscroll.min.js"></script> <script type="text/javascript" src="../scripts/plugins/instafeed.min.js"></script> <link rel="stylesheet" href="../scripts/plugins/jquery.simplyscroll.css" media="all" type="text/css"> <script type="text/javascript"> (function ($) { $(function () { //on dom ready var feed = new instafeed({ get: 'user', userid: xxxxxxxx, clientid: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', accesstoken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' }); feed.run(); $("#instafeed").simplyscroll({ automode: 'bounce', startonload: true, auto: true, speed: 1, pauseonhover: true, pauseontouch: true }); }); })(jquery); </script>
the ordering of commands made me wonder if being ordered in javascript prevent scrolling happening once images loaded. may explain why pictures scroll once they're loaded instagram.
try script follows on site (tweak required) , see if helps, creates feed , applies scroll:
<script type="text/javascript"> (function ($) { $(function () { //on dom ready var feed = new instafeed({ get: 'user', target: 'instagram_list', userid: xxxxxxxxxxxxxxx, limit: 15, accesstoken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', resolution: 'thumbnail' }); feed.run(); $("#instagram_list").simplyscroll({ speed: 1, framerate: 20, orientation: 'horizontal', direction: 'forwards', customclass: 'instagram_scroller' }); }); })(jquery); </script>
thanks
Comments
Post a Comment