Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-05-15
9
Medium Priority
?
2,660 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 2000 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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
 
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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)
Suggested Courses

610 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