punkave/phpQuery — pull request #2 by coderkk (2012-06-07 01:37:47+00:00)
Title: Implement css() at phpQuery

I have implemented a css(), show() and hide() function at phpQueryObject.php

Basically, the syntax call like jQuery.

Example,
$doc = phpQuery::newDocumentHTML("

Content Here

");

// setter using property name
$doc[".styleHere"]->css('background-color', '#003300');

// setter using property namemap
$doc[".styleHere"]->css(array(
"border" => "1px solid #0000",
"border-collapse" => "collapse;"
));

// getter using property name
echo "Border is : " . $doc[".styleHere"]->css('border');

// output result
echo $doc;

Also can hide the element using $doc[".styleHere"]->hide(), and show the element using $doc[".styleHere"]->show()