Question about obtaining background-position using jquery
When using jquery (Version 1.3.2), $ ("a div" Development .css ("background-position") cannot be obtained in all versions of IE, and the returned results are undefined. Later, I checked the data and found that I could not obtain this attribute in IE. I could only obtain background-position-X and background-position-y.So Code Must be modified. VaR defaultpoint = []; VaR P = $ ("# welcomepanel P" ).css ("background-position "); // Here is the IE fix, and the background-position cannot be obtained in IE, // Only background-position-X and background-position-y can be obtained. If (typeof (p) = "undefined "){ Defaultpoint [0] = $ ("# welcomepanel P" ).css ("background-position-X "); Defaultpoint [1] = $ ("# welcomepanel P" ).css ("background-position-y "); } Else { Defaultpoint = P. Split (""); } |