button text, hide then show again
I'm trying to create a toolbar that displays text and icons on buttons. But when the browser is resized to smaller than the width of the toolbar with all of the text (before it wraps to a new line of buttons), I want to remove the text. This works fine. The problem is when I try to add the text back in (when the window is big enough to show it again). The icons are shifted to the left, but no text. Maybe I'm doing something wrong. Here's the problem code:
/* on resize function */
function updateToolbar() {
/* Update Width: */
if (jq(".toolbar").innerWidth() > 710) { //text
jq(".toolbar button").button("option", "text", true);
} else { //just icons
jq(".toolbar button").button("option", "text", false);
}
}
Change History (2)
Milestone: |
TBD →
1.9
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Fixed in 01ad6ce.