[jQuery] Problems with jqm in IE
Hi guys,
After some laborious use of alerts, I've tracked down my bug in IE,
and it relates to $().jqm().
I think It's a live query style issue (I'm not actually using live
query!).
I have a function that attaches events to elements, and this is called
again when new elements are added via AJAX.
I have the following code:
attachEvents: function()
{
// do stuff...
if(!$('#dialog').jqm)
{
alert('jqm fn does not exist!!');
}
/* make modal popup from #dialog */
$('#dialog').jqm(
// ... blah blah blah
So, the attachEvents function gets called multiple times.
In FF, everything is fine.
In IE, the second time you call attachEvents, $('#dialog') still
alerts as an object, but it doesn't have a .jqm() method!
Unsurprisingly, the error is "Object doesn't support this property or
method."
Any suggestions?? I'm pretty stumped :|