Problem with jquery replacement of form input for cufon use in IE 8
I have 4 input buttons that I want to replace with cufon. I read about a strategy on stackoverflow that involves hiding the input fields and displaying a span with the same content so cufon can replace it. I have it working in chrome, firefox and IE 9 but in IE 8, nothing replaces the hidden divs. This is the code I am using
$(document).ready(function() {
$('#utmodes input').each(function(){
$(this).hide().after('<span id="' + $(this).attr('id') + '" class="input-button">').next('span.input-button').addClass($(this).attr('class')).text($(this).val()).click(function(){
$(this).prev('input').click();
Cufon.replace('#utmodes sp开发者_JAVA百科an', {
hover: true
});
});
});
The actual page is http://tinyurl.com/3zvjvgl. The 4 input fields are the "file upload", "flash upload" etc. In ie 8, you will see a blank spot where those 4 inputs are.
Found the problem. I had the close the span tag I was adding using .after()
精彩评论