jquery-ui buttons sometimes slow to render, css alternative? -
I'm using jquery-ui button support looks good, stylish buttons are good only The downside is that It appears that the button is rendered in Javascript, so sometimes there is a break when the page loads and you see that all the buttons change jquery-ui style buttons from the original buttons.
Is there any 'button manufacturers' out there that can generate CSS for just one button that I can apply to get the same effect on a single device? I was probably thinking that if I manually styled the button, then the browser will prepare it before the page will be shown to the user anytime, to avoid this strange pause.
Thank you
Some things - First of all, if you are doing this just to create a static button (Read: Not as a replacement for checkboxes or radio boots ) You can always use javascript-generated HTML, in fact without having to call the .button
function. After inspecting the button
function next element called, you will see that the HTML has been slightly altered, and several classes have been added to the element:
& Lt; One class = "ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" href = "#" role = "button" & gt; & Lt; Span class = "ui-button-text" & gt; Button content & lt; / Span & gt; & Lt; / A & gt;
Unfortunately, in the generated jQuery css, : hover
and : active
are not included in the pseudo-class, but we're easy That can be cured by that. Search for CSS in ui-state-hover
and ui-state-active
and manually add to the appropriate pseudo-class.
Alternatively, you can also do your own role, for example what I have done in the example below: It is basically in a class removed on the application of jQuery UI styles The font of the button and the background color copies:
In the example, we use a thirolar jQuery UI theme without CSS modifications are described above, adapt to the network delay in loading scripts and images Several seconds to test .button
was delayed.
Comments
Post a Comment