koca79331
koca79331

Reputation: 421

JQuery, javascript, Each function

I have inputs hidden from PHP and I'm corventing it into javascript array. Now I need some function in jQuery like

$(".data").attr('data-day'== day).each(function(){});

I need this solution, no others... Thanks!

Upvotes: 1

Views: 40

Answers (1)

John Bupit
John Bupit

Reputation: 10618

Here's how you do it:

$(".data[data-day='" + day + "']").each(function() { 
    ...
});

Upvotes: 4

Related Questions