views:

359

answers:

1

I have a jQuery UI Button that I'm placing in a jqGrid toolbar but the contents of the button are wrapping. I've tried to prevent the wrapping by using CSS white-space Property to no avail.

Here's a snapshot of what's happening:

alt text

Here are two code snippets of my attempt to fix the problem:

    $("#t_imageList").css("white-space", "nowrap").html('<button>Add</button>');

    $("#t_imageList button").button({
        icons: {primary: 'ui-icon-plus'},
        text: true
    });

and/or

$("#t_imageList button").css("white-space", "nowrap").button({
    icons: {primary: 'ui-icon-plus'},
    text: true
});

Has someone experienced the same issue? If so, what was your solution?

A: 

This is sort of a repeat question:

http://stackoverflow.com/questions/2525524/jquery-ui-dialog-button-icons

Actually this is an issue with versions. I was using jquery 1.8 but the 1.7 css files. A simple oversight.

gurun8