Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Property Pseudo Selector
// $("video:prop('paused', false)")
$.expr[":"].prop = function(element, index, match, array) {
var parameters = match[3].split(","),
name = $.trim(parameters[0]).replace(/['"]/g, ""),
value = $.parseJSON($.trim(parameters[1]));
return element[name] === value;
$("button").click(function() {
console.log($("video:prop('paused', true)").length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.