Keith Keith - 11 months ago 54
Javascript Question

Data Selector With jQuery Not Working

I've tried to create a JSFiddle for an example of a selector I was trying to use and it's not working. Can someone eyeball it and tell me what I have wrong?

Here's the fiddle:

My code was inspired by this example:

$(":data(date)").each(function() {
var element = $(this);


You want an attribute selector:



If you want the :data pseudo selector to work, you need to include jQuery UI.