How the jquery: contains selector calculates the number of matches

$(document).ready(function () {
    $("-sharpsearch").click(function () {
        var index = $.trim($("-sharpsearch_text").val().toString());
        $("li:contains("" + index + "")").show();
    });
});

as shown above, my goal is to perform front-end search after clicking the button, so how do I count the number of matches now?
$("li:contains ("" + index + ")"). Lenth; intended to write like this, but failed


should be OK. Is that why your length is wrong?


$("li:contains (" + index + ")"). Show ();
) just write this directly

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37b48-2b41b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37b48-2b41b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?