How to make this jquery UI code compatible with jQuery UI 1.7.2 and jQuery 1.3.2?
http://jsfiddle.net/jitendravyas/NTeXV/2/
In a old project where jquery 1.3.2 is being used heavily so i can't change that and I开发者_运维百科 want to style some checkboxes like this I made this by reading documentation on jquery ui website the later I found that it only works with jQuery 1.4.4 or greater and jQuery UI 1.8.7+ see here http://jsfiddle.net/jitendravyas/GUwjK/
but I want to make it work with jQuery 1.3.2 and jQuery UI 1.7.2
$(function() {
$( "#check1, #check2" ).button();
});
According to the documentation: http://docs.jquery.com/UI/Button this feature was only created in version 1.8 - so you can't. The code just doesn't exist in older versions.
You could write it yourself of course, or try to strip out the parts you need and copy them.
精彩评论