• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2785
  • Last Modified:

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?


https://github.com/jquery/jquery-mobile/pull/4759
http://stackoverflow.com/questions/14384967/jquery-1-9-0-breaks-attrfn-object

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

0
Camillia
Asked:
Camillia
  • 5
  • 4
1 Solution
 
Michel PlungjanIT ExpertCommented:
You should not have used undocumented calls.

Try adding

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

somewhere
0
 
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?
0
 
Michel PlungjanIT ExpertCommented:
Yes. It should handle it. Alternatively remove the code - show where it's used and we can help
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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?
0
 
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
migrateWarn
0
 
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
0
 
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.
0
 
Michel PlungjanIT ExpertCommented:
Just leave this question open
0
 
CamilliaAuthor Commented:
thanks, going to close this until i get the know the code more. Thanks for your help
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now