Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

jQuery works in Chrome but not in IE 7

Posted on 2014-03-27
3
Medium Priority
?
335 Views
Last Modified: 2014-03-27
Hi,
This jQuery works in Chrome but not in IE 7 is there a reason why?
Is there a way to try my command from console as in Chrome?

$('a:link', $("label[for='P11_ORDER_NUMBER']")).css({"color":"red"});

$('a:link', $("label[for='P11_ORDER_NUMBER']")).css("color","red");

Thank you, Bill
0
Comment
Question by:bcarlis
[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
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 800 total points
ID: 39959718
Why << :link >> additionaly to << a >>?
Check this test page on IE7 : http://jsfiddle.net/M8LaL/2/

$('a', $("label[for='P11_ORDER_NUMBER']")).css({"color":"red"});

Open in new window

0
 
LVL 13

Expert Comment

by:Carl Bohman
ID: 39959735
I'm not sure which version of jQuery you are using, but if you are trying to use jQuery 2 with IE 7, it is not guaranteed to work according to this page:

http://jquery.com/browser-support/
0
 
LVL 2

Author Closing Comment

by:bcarlis
ID: 39959981
That did it!
Thank you!
jQuery 1.8.22
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
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)

670 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