Solved

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

Posted on 2013-05-15
9
2,326 Views
Last Modified: 2013-05-23
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
Comment
Question by:Camillia
  • 5
  • 4
9 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 39171860
You should not have used undocumented calls.

Try adding

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

somewhere
0
 
LVL 7

Author Comment

by:Camillia
ID: 39171901
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
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 39172446
Yes. It should handle it. Alternatively remove the code - show where it's used and we can help
0
 
LVL 7

Author Comment

by:Camillia
ID: 39172524
>> 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 7

Author Comment

by:Camillia
ID: 39172582
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
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 39174111
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
 
LVL 7

Author Comment

by:Camillia
ID: 39174495
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
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 39174507
Just leave this question open
0
 
LVL 7

Author Closing Comment

by:Camillia
ID: 39193055
thanks, going to close this until i get the know the code more. Thanks for your help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Weekend adv creator 3 14
Need to click button twice to get results 2 34
Animated .jpg? 13 62
Open Attachment from within List Field in SharePoint Online 1 28
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now