Moving from jQuery 1.2.6 to jQuery 1.9.0 causing errors

Hi when run jQuery 1.9.0 on my site rather than 1.2.6 I get an error caused by the blur on a form, if I remove the code below I get no errors but the blur on the form is obviously gone, any idea what is causing the problem?

$(function() {
	http_val = '';
	if ($('input#http').length > 0)
		http_val = $('input#http').attr('value');

	$('#quick_search input[@type=text]').focus(function() {
		if ($(this).attr('value') == $(this).attr('title'))
			$(this).attr('value', '');

	$('#quick_search input[@type=text]').blur(function() {
		if ($(this).attr('value') == '')
			$(this).attr('value', $(this).attr('title'));

	if ($('#frm').length > 0)

Thanks John

Hi there,

Something in that code will have been deprecated.
I don’t have an idea off the top of my head, but if you could post a link to your site, it should be relatively simple to figure out.


Try $("#quick_search input[type='text']") instead of $('#quick_search input[@type=text]')
Does that make a difference?

That worked perfectly, thanks for your time

No problems :slight_smile:
Thank you for taking the time to follow up.