I am trying to rename my tag with input, once the key is pressed it feed.run Is run again by ();
var num = 60; Var inputTextValue; Window.onkeyup = keyup; Function Funnel (E) {inputTextValue = e.target.value; . $ ('# SearchValue') text (inputTextValue); If (e.keyCode == 13) {inputTextValue = e.target.value; Feed.run (); }} Var feed = new Instafeed ({get is: 'tagged', tagname: inputTextValue, userId: 3,614,616, accessToken: '3614616.467ede5.abc0b5a861d34365a5c8dd8db0163c4b', range: "100", Resolution: "Low_resolution" After: function ( ) {Var images = $ ("# instafeed"). ('A'); $ .each (images, function (index, image) {var delay = (index * 75) + 'ms'; $ (image). Css ('-bbkit-animation-delay', delay); $ (image). Css ('-socks-animation-delay', delay); $ (image) .css ('-ms-animation-delay', delay ); $ (Image) .css ('-o-animation-delay', delay); $ (image). Css ('animation-delay', delay); $ (Image) KaddClass ( 'animated Flipiaks');});} template:' & lt; a href = "{{link}}" target = "_ blank" & gt; & lt; img src = "{ {Image}} "/> gt; & lt; div class =" like "& gt; & gt; heart; {{likes}} gt; '}) ;
and I'll get an error with it
no tag name is specified, use the 'tagname' option
Any idea can update tag name value? Thanks for the help.
The root of this issue that you are running in the variable works in Javascript.
The strings are "passed by value", which in your case it means that the value of input text VLUE
is copied to Instafeed.js When you make your example by doing new Instafeed ({..}), then
.
It also means that when you value inputTextValue
later, it will not update the Instafeed.js settings (because it copied when you install Instafeed.js).
In order to work around it, you would like to update the Instafeed.js settings directly by changing a property on your feed
variable. Here is a slightly modified version of your original script:
var num = 60; Var inputTextValue; Var feed = new Instafeed (get {: 'tagged', tagname 'placeholder', userId: 3,614,616, accessToken: '3614616.467ede5.abc0b5a861d34365a5c8dd8db0163c4b', range: "100", Resolution: "Low_resolution" After: function ( ) {Var images = $ ( "# instafeed"). ( 'A'); $ .each (images, function (index image) {var delay = (index * 75) + 'MS'; $ (image). Css ( '-vibikit-animation-delay, delay); $ (image). css (' - socks-animation-delay, delay); $ (image). css ( '- MS-animation-delay, delay ); $ (Image). CSS ('-o-animation-delay', delay); $ (image). CSS ('animation-delay', Ilnb); $ (image) KaddClass ( 'animated Flipiaks');});} template:' & lt; a href = "{{link}}" target = "_ blank" & gt; & lt; img Src = "{{image}}" /> & lt; / a & Gt; '}); Window.onkeyup = keyup; Function Funnel (E) {inputTextValue = e.target.value; . $ ('# SearchValue') text (inputTextValue); If (e.keyCode == 13) {inputTextValue = e.target.value; Feed.options.tagName = inputTextValue; Update // instafeed.js settings firmly; feed.run (); }}
No comments:
Post a Comment