Solved

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

Posted on 2013-05-15
9
2,472 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 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
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to use string functions to get particular string 3 50
HTML editor custom button 3 84
javascript delete path 7 42
Error just appeared 3 20
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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)
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…

738 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