What is "attrFn"? Anyway to upgrade/replace it?

I have the code below that uses attrFn but it's deprecated. I found these 2 links but still not clear on how to replace that.. Use Migrate plugin or is there another way to do this?


This is my code

	// support for jQuery 1.3.2 - handle common attrFn methods for dialog
	attrFn = $.attrFn || {
		val: true,
		css: true,
		html: true,
		text: true,
		data: true,
		width: true,
		height: true,
		offset: true,
		click: true

Open in new window

Who is Participating?
Michel PlungjanIT ExpertCommented:
You should not have used undocumented calls.

Try adding

$.attrFn = $.attrFn || {};

CamilliaAuthor Commented:
this is code that I got from someone else and we're trying to upgrade it...

now, what do you mean add "somewhere"? i should keep that code and just add that line of code you have?
Michel PlungjanIT ExpertCommented:
Yes. It should handle it. Alternatively remove the code - show where it's used and we can help
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

CamilliaAuthor Commented:
>> show where it's used and we can help

the code is above. Post the Jquery , the entire file here?? (sorry, new to Jquery)..OR...do i need to find where that JQuery function in the code is being called?
CamilliaAuthor Commented:
I added it to the bottom of the code above, like below. In Chrome, I clicked on "inspect element" and "console" tab. I still see that it's referring to that function

JQMIGRATE: jQuery.attrFn is deprecated jquery-migrate-1.2.1.js:41
console.trace() jquery-migrate-1.2.1.js:43
Michel PlungjanIT ExpertCommented:
Yes it will still show up because it will use it if present and not if not.

Post the code where you call it
CamilliaAuthor Commented:
i'm new to the code. Let me find the call. (let me know if you want me to close this question and open a new one) Thanks for sticking with this question.
Michel PlungjanIT ExpertCommented:
Just leave this question open
CamilliaAuthor Commented:
thanks, going to close this until i get the know the code more. Thanks for your help
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.