Keith Keith - 1 year ago 82
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);

Answer Source

You want an attribute selector:



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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download