phpQueryObject::switchWith PHP Method

switchWith() public method

.. jQuery difference.
public switchWith ( $markup )
    public function switchWith($markup)
    {
        $markup = pq($markup, $this->getDocumentID());
        $content = null;
        foreach ($this->stack(1) as $node) {
            pq($node)->contents()->toReference($content)->end()->replaceWith($markup->clone()->append($content));
        }
        return $this;
    }