Hello all,
I'm trying to make a clickable span. I thought I had this working
earlier, but now I'm totally stumped. It works fine in Safari 3 but
the iPhone isn't registering the click event.
html:
<ul id="current" title="Current" toolbarButtonText="Edit"
toolbarButtonType="edit" toolbarButtonClass="button blueButton" >
                <li id="current-1"><span class="deleteItem"
action="confirmDelete"><img src="/iui/delete.png"></span><a href="/
mockups/connection.html" target="_self">connection 1</a><a href="/
connection/1/delete" target="_self" class="button redButton"
style="display:none;">Delete</a></li>

hacked iUI event:
addEventListener("click", function(event){
        var span = findParent(event.target, "span");
        if(span)
        {
                console.log("click on span");
                if(span.getAttribute("action") == "confirmDelete")
                {
                        var itemID = findParent(span, "li");
                        confirmDelete(itemID.id);
                }
                else
                        return
                event.preventDefault();
        }

}, true);

confirmDelete function:
function confirmDelete(li)
{
        alert($("#"+li).children("a.redButton"));
        $("#"+li).children("a.redButton").slideToggle("medium");
}



I'm using iBug and I never get the console.log message of "click on
span", so it doesn't seem to want to get the click.

Like I said, I had this working at one point, so I don't know if I'm
going crazy or missing something or if you can't get click events on
spans in the iPhone.

Anyone have any ideas?

Thanks,
BJ Clark
[EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to