[eluser]Total Shop UK[/eluser]
I'm trying to get the QuickEdit code below to work with IE...it works fine with FF.
Anyone able to help?
Code:
<ѕcript type="text/javascript">
(function($) {
$.fn.inlineEdit = function(options) {
options = $.extend({
hoverClass: 'hover'
}, options);
return $.each(this, function() {
var self = $(this);
var id = $(this).attr('id');
self.value = self.text();
self.bind('click', function() {
self
.html('<input type="text" id="'+ id +'" value="'+ self.value +'">')
.find('input')
.bind('blur', function(event) {
$.post("/_ajax/quick_save",{
id: $(this).attr('id'),
value: $(this).val()
});
self.value = $(this).val();
self.text(self.value);
})
.focus();
})
.hover(
function(){
self.addClass(options.hoverClass);
},
function(){
self.removeClass(options.hoverClass);
}
);
});
}
})(jQuery);
$(function(){
$('.editable').inlineEdit();
});
</ѕcript>
Code:
<span id="policy_code" class="editable">DP-001<span>