Page 1 of 1

Call function javascript affer listitem binnding data from services

Posted: Wed Jan 30, 2013 11:34 am
by Chung Nguyen

Hello

How i can call 1 function javascript after listitem binding data and show it?

Please help me!


Call function javascript affer listitem binnding data from services

Posted: Wed Jan 30, 2013 12:13 pm
by Maryna Brodina

Hello! You can use Success service event. Here is more information http://docs.tiggzi.com/documentation/...


Call function javascript affer listitem binnding data from services

Posted: Wed Jan 30, 2013 12:32 pm
by Chung Nguyen

Hello

I did using it, but it not work

Because, I call jquery function

It not effect with element create after function jquery call

= I must call jquery function after element of list item binding and show on screen

How i can make it?

Please help me!


Call function javascript affer listitem binnding data from services

Posted: Wed Jan 30, 2013 2:17 pm
by Maryna Brodina

If I understand you correctly you need to add Click event on dinamically created List Item - you can use on() jquery method http://api.jquery.com/on/ (see Direct and delegated events section)

For example on success service use next JS code:

Tiggzi("mobilelistName").off(); /unset all event handlers from List with name 'mobilelistName'/
/*set delegated event handler */
Tiggzi("mobilelistName").on('click','a',function(){
alert(this.innerText);
})

Result - when you click on dynamically created List item - you'll see you'll get message with Item text