?
Solved

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

Posted on 2013-05-15
9
Medium Priority
?
2,566 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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
Suggested Courses

752 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