Keith Keith - 5 months ago 6x
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.