Page 2 of 3
Dynamically adding list Items to a list via JS
Posted: Fri Dec 13, 2013 12:04 am
by Cody Blue
Thats for your feedback. However, I think the format of your response has been lost and it looks as follows:
Appery('buddyList').append( ''+buddyListJSON+'');
The same happened to me in my first post.
Could you send me a screenshot or a picture to preserve the formatting?
Thank you.
Dynamically adding list Items to a list via JS
Posted: Fri Dec 13, 2013 12:04 am
by Cody Blue
Thats for your feedback. However, I think the format of your response has been lost and it looks as follows:
Appery('buddyList').append( ''+buddyListJSON+'');
The same happened to me in my first post.
Could you send me a screenshot or a picture to preserve the formatting?
Thank you.
Dynamically adding list Items to a list via JS
Posted: Fri Dec 13, 2013 12:29 am
by Illya Stepanov
Hi Cody,
We are sorry about that, it should be this:
pre
code
Appery('buddyList').append( '<li data-name="buddyListItem_"' +i+ '><a href="" name="buddyListItem">'+buddyListJSON+'</a></li>');
/code
/pre
Dynamically adding list Items to a list via JS
Posted: Fri Dec 13, 2013 12:59 am
by Cody Blue
Thank you. Unfortunately, that still doesn't work. I tried the following (but no luck with that either). Any thoughts?
Dynamically adding list Items to a list via JS
Posted: Fri Dec 13, 2013 12:40 pm
by Kateryna Grynko
Hi,
You should place "i" between double quotes, for example:preAppery('buddyList').append('a href="http://" name="buddyListItem' + i + '" rel="nofollow"' + buddyListJSON+'');
);/a/pre
Dynamically adding list Items to a list via JS
Posted: Fri Dec 13, 2013 11:59 pm
by Cody Blue
Hi Katya,
Thanks for your response, but as I indicated earlier the formatting of your response if getting lost in the reply. Could you send me a picture of your code? If you just meant putting variable - i - in double quotes, its not doing anything for me (please see the picture in my next reply).
I am thankful for all the help, but this is getting a bit frustrating with the needed back and forth (which although is for the right reasons of course).
Thank you,
Jatinder
Dynamically adding list Items to a list via JS
Posted: Sat Dec 14, 2013 12:00 am
by Cody Blue
Dynamically adding list Items to a list via JS
Posted: Sat Dec 14, 2013 12:19 am
by Alena Prykhodko
Jatinder, we are sorry, this code is not formatted:
precodeAppery('buddyList').append('<li data-name="buddyListItem' + i + '"><a href="" name="buddyListItem' + i + '">' + buddyListJSON+'</a></li>');
);
/code
/pre
Dynamically adding list Items to a list via JS
Posted: Sat Dec 14, 2013 1:05 am
by Cody Blue
Unfortunately, this gives a syntax error. Were you able to test it via the sharing I've done?
Thanks,
Cody
Dynamically adding list Items to a list via JS
Posted: Sat Dec 14, 2013 1:16 am
by Cody Blue
This doesn't seem to solve the problem. What is the "handle" I should use for accessing new dynamically created listItems. The following gives a blank alert.
alert(Appery('buddyListItem1').text());
Thanks,
Cody