everisk Posted November 26, 2009 Share Posted November 26, 2009 Hi, I have the below code that should run on ready(). It works fine on Firefox but not IE Any ideas? THank! <script type="text/javascript"> $(document).ready( function() { var $items = ['regular', 'outsource', 'total_headcount', 'internal', 'external', 'resigned', 'eligible', 'member', 'valoptec_percent']; $($items).each(function() { totalIt(this); }); } ); Quote Link to comment Share on other sites More sharing options...
JustLikeIcarus Posted November 26, 2009 Share Posted November 26, 2009 You need to add a '#' to your selector. Try it like this. <script type="text/javascript"> $(document).ready( function() { var items = ['regular', 'outsource', 'total_headcount', 'internal', 'external', 'resigned', 'eligible', 'member', 'valoptec_percent']; $.each(items, function() { totalIt('#'.this); }); } ); Quote Link to comment Share on other sites More sharing options...
.josh Posted November 26, 2009 Share Posted November 26, 2009 I made a dummy totalIt() function that just alerts the value. All of the values in the array alerted for me in IE8 and IE7. Perhaps you should explain what doesn't work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.