Using jQuery 1.7.2. Tested with versions as old as 1.5.1. Same result.
In FF and IE less than 9 it works fine returning the expected jQuery object of DOM elements. However, in everything else it returns a jQuery object of jQuery objects of DOM elements. This screws with anything attempting to get the width or height since those functions in jQuery eventually expect the passed element to be a DOM element (I did a lot of tracing). Also, I have never encountered this problem before. This is the site where it all went wrong. I have not fixed the previous and next buttons yet if you would like to see it in action. It is supposed to call click() on the next playlist element. Doesn’t because of this issue.
The code is take from MediaElementJS.
t.controls = t.container.find('.mejs-controls');
t.layers = t.container.find('.mejs-layers');
The fix I eventually came up with.
if(!mf.isFirefox && !(/MSIE [876]/.test(navigator.userAgent))){
t.controls = t.container.find('.mejs-controls').get(0);
t.layers = t.container.find('.mejs-layers').get(0);
}else{
t.controls = t.container.find('.mejs-controls');
t.layers = t.container.find('.mejs-layers');
}
Now, why on God’s green earth is it being bad on the new browsers, except FF?
Here are the lines if you want to set-up break-points:
- jquery+mep.js (used to have jQuery bundled in here, took it out for testing)
- next: 4595
- previous: 4600
- jquery-1.7.2.js
- jQuery.next(): 5582
- jQuery.prev(): 5585
- jQuery.nth(): 5666
UPDATE
Other pages seem unaffected; like http://www.commercialsonhold.com/messagesamples/aesthetics.htm. I am starting to think something else on the page is messing with jQuery. The site is Joomla! I often have trouble with MooTools on Joomla! sites, however, it is normally jQuery not working at all and not just one function acting aberrantly.
UPDATE
The jsFiddle: http://jsfiddle.net/h5ahY/4/

Found the issue. It was MooTools. I don’t know how and I don’t know why.
Fixed by moving the jQuery include above the MooTools include and using
jQueryinstead of$everywhere.Will get a jsFiddle up soon now that I know how to use it now.