Search and Top Navigation
#7814 closed bug (wontfix)
Opened October 26, 2011 08:50AM UTC
Closed October 15, 2012 08:49PM UTC
Button: Exception - htmlfile: Unexpected call to method or property access.
Reported by: | jimmyheaddon | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.0 |
Component: | ui.button | Version: | 1.8.16 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you create a button using jQuery UI 1.8.16, jQuery 1.6.4 and Internet Explorer 8 it generally works fine if you declare the button as so:
<button id="test">Hello World</button>, calling it as $('#test').button();
But if you try and use an img tag to create an image button as so:
<img id="test" class="ui-corner-all" src="url/to/image.png" alt="Alt" />, and call it the same as before $('#test').button() you will get the following exception message
"htmlfile: Unexpected call to method or property access."
The button is actually created on the page and shows through with the image specified centered correctly, and all of the hover-active-etc states work, but it will only perform the .button() function on the first instance if you call $('img').button() as a crude example, and it will still throw the exception once.
Is it also possible for a label like in the <button> example above to be shown for an <img> based button, shown under the image but still within the confines of the button itself?
Regards
Attachments (0)
Change History (2)
Changed October 11, 2012 02:43PM UTC by comment:1
milestone: | 1.9.0 → 1.11.0 |
---|
Changed October 15, 2012 08:49PM UTC by comment:2
resolution: | → wontfix |
---|---|
status: | new → closed |
summary: | jQueryUI Button Exception - htmlfile: Unexpected call to method or property access. → Button: Exception - htmlfile: Unexpected call to method or property access. |
It would be much better to wrap you image in a clickable element, <a> <button> and call the button element on that.