Page 4 of 4

How to embed images stored in my app into an email using SendGrid?

Posted: Wed Nov 19, 2014 10:55 am
by Evgene Karachevtsev

Hello Alex,

Could you please clarify, on what event you is this code hung?
Are you sure that this is right?
pre$(this).index()/pre


How to embed images stored in my app into an email using SendGrid?

Posted: Tue Nov 25, 2014 10:36 pm
by Łukasz Kozłowski

Hi Alex,
Did you manage to find what was the issue with
"$(this).index()" ? I experience the same issue (when I manually put number instead of this code it works)
Maybe some recent update disallows "$(this).index()"?


How to embed images stored in my app into an email using SendGrid?

Posted: Wed Nov 26, 2014 5:29 am
by Yurii Orishchuk

Hi Alex and Łukasz,

$(this).index() code returns current position of the element in the parent relatively to the siblings.

So "this" should be element of the list(you can use "console.log(this)" to see what is element you have. I guess is: "this" is not a root element of the list or table(don't know what you use). So you should modify this code to get from "this" - root of you list-item or table item.

For example for list-item component click it should be:

pre

var index = jQuery(this).closest("li").index();

//Debug message.
alert("itemIndex = " + index);

//Index using.
//Apperyio.storage.musical_instruments.get()[index];

/pre

Regards.


How to embed images stored in my app into an email using SendGrid?

Posted: Wed Nov 26, 2014 5:50 am
by Alex GG

Hi Lukasz,

At the end I decided not populate the list by rest service, because of that issue..

So I created the list manually and use this code on list item click...

Try the code suggested by Yurii...i guess this will work..

Regards

Image


How to embed images stored in my app into an email using SendGrid?

Posted: Wed Nov 26, 2014 9:51 am
by Łukasz Kozłowski

Thank you Yurii for prompt response! It works fine now :D

thanks Alex!