Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

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

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

Łukasz Kozłowski
Posts: 0
Joined: Tue Nov 25, 2014 10:36 pm

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

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()"?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

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

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.

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

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

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

Łukasz Kozłowski
Posts: 0
Joined: Tue Nov 25, 2014 10:36 pm

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

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

thanks Alex!

Return to “Issues”