iUi - Extra content inside LI link

2 views
Skip to first unread message

David Ethell

unread,
Nov 27, 2007, 4:43:43 PM11/27/07
to iPhoneWebDev
We have some extra content in the iui LI tag below the anchor tag. It
just provides text decriptions of what the next page is. For example:

<li><img src="images/blank_icon.png" class="linkicon"/><a
href="#somepagel">A New Page</a>
<p class="linkdetails">Everything you want to know about
whatever.</p>
</li>

The visual display of the LI looks fine with a graphic icon in front
of the HREF and the text details (controlled by the linkdetails class)
after. The only problem is the clickable region of the anchor is still
the default iUi settings so tapping the text below the anchor is not
included as well as the bottom half of the icon. I'd like to make all
the content in the LI clickable.

Are there any opinions on the best way to do this? I thought about
adding an event listener to the LI so that it picks up the click and
just fires the first anchor it has using getElementsByTagName. Does
that seem like the best approach or is there a simpler way to make the
entire contents of the LI clickable?

Thanks,
David

David Ethell

unread,
Nov 29, 2007, 5:24:52 AM11/29/07
to iPhoneWebDev
I just ended up putting all the contents of the LI inside the anchor
tag and using CSS rules to reformat the elements inside the anchor so
that my sub elements were formatted like "normal" text. This pretty
well gave the behavior I needed.

David
Reply all
Reply to author
Forward
0 new messages