Archive for May, 2010

JQuery print part of div only

Wednesday, May 19th, 2010

So here is an interesting jquery plugin called jqprint it allows one to specify any element and sent it to print. Assuming you have an element with id printButton and a content area called divToPrint ?View Code JAVASCRIPT1 2 3 $(’#printButton’).live(’click’, function() { $(’#divToPrint’).jqprint(); }); This will pop up the print functionality in your browser [...]

Share

JQuery get ajax call not working in IE

Wednesday, May 5th, 2010

So for some reason IE just loves to cache things for you when you call an ajax method. Something like ?View Code JAVASCRIPT1 2 3 4 5   $(’#mybutton’).live(’click’, function() { $.post(’SaveLanguage’, { lang : $(this).val(), null, null); $.get(’GetLanguage’, null, function(html) { $(’#myDiv’).replaceWith(html); }); }); This will work every time in firefox but IE will [...]

Share

JQuery live ‘change’ doesn’t work in IE

Tuesday, May 4th, 2010

So was having issues as in why does my checkbox doesn’t work in IE when I do ?View Code JAVASCRIPT1 2 3 $(’.checkbox’).live(’change’, function() { alert(’Checkbox clicked’); }); And found out that jquery does not bind live “change” events, I was told that it works in 1.4.2 but for some reason I still was not [...]

Share