[jQuery] Can some one convert simple code to jQuery

[jQuery] Can some one convert simple code to jQuery


Can some one convert following code to jQuery ?
function check(value)
{
    x = document.bulk_import.elements.length;
    for(i=0;i<x;i++)
{
        if(document.bulk_import.elements[i].name == 'article_id[]')
{
            document.bulk_import.elements[i].checked = value;
        }
    }
}
The function is used to check/uncheck all check box.