Arrilot\Widgets\Factories\JavascriptFactory::constructJqueryAjaxCall PHP Method

constructJqueryAjaxCall() protected method

Construct ajax call with jquery.
protected constructJqueryAjaxCall ( string $url ) : string
$url string
return string
    protected function constructJqueryAjaxCall($url)
    {
        $id = WidgetId::get();
        return "var widgetTimer{$id} = setInterval(function() {" . 'if (window.$) {' . "\$('#{$this->getContainerId()}').load('{$url}');" . "clearInterval(widgetTimer{$id});" . '}' . '}, 100);';
    }