DataZombies / jQTouch

jQT extensions jqt.activityIndicator, jqt.bars (with numeric badges), jqt.checkGroup & jqt.segmentedControl.Get updates via Twitter http://twitter.com/HeadDZombie. If you find this fork useful please make a donation via PayPal (http://tinyurl.com/2fpmx27). See below for demo links.
MIT License
159 stars 34 forks source link

Dynamic List Links not executing code #60

Closed SteveCC closed 12 years ago

SteveCC commented 12 years ago

Am having an issue where a dynamically created list of links, once click on they don't execute the code they're supposed to. A test hardcoded list item link does however work. - Strange. Have I missed something?

Project works like this:

Page 1 Search options - User selects options and clicks find. On the click search options are taken, XML is loaded and searched using option taken.

Page 2 A Dynamic list of results is created on from results. Once one is clicked on more details are shown on page 3 The Dynamic links goto page 3 but do not execute the code (load details from xml). Code is set to execute on a Click/Tap of a list item.

Page 3 More details should be shown. Details only shown on a hardcoded test list item link.

Any ideas / suggestions?

SteveCC commented 12 years ago

Just a I post this I find answer, sorry.

I was using this to execute code:

$('#theResults li a').bind('tap',function(){ // my code });

But changed it to this and now works:

$('#theResults li a').live('click',function(){ // my code });

Had to use 'click' not 'tap' as it didn't work with 'tap'.

SteveCC commented 12 years ago

Hold on it actually doesn't work on an iPhone. Have tried this: http://blog.alanszlosek.com/post/4369588562/jquerys-live-click-handler-on-mobile-safari But no joy.

Any ideas?

SteveCC commented 12 years ago

This time it is closed. http://spreadyourwealth.blogspot.com/2009/04/jquery-events-not-firing-for-dynamic.html

Tested. We're done!