Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

XLabs HybridwebView how to load a jquery with CallJsFunction?

$
0
0

Hello,
i need load a page and inject the jQuery on the page, im doing it but not work:
My C# Xamarin Code:

//Add Loader
hwv.CallJsFunction("var Loader=new function(){var t=function(){var t=document.createElement('script');t.src='https://code.jquery.com/jquery-2.1.3.min.js',document.body.appendChild(t);}; t();}");

//Call jquery
hwv.CallJsFunction("$(function() { $(\"*\").css(\"color\", \"red\") });");

My JavaScript Code:

var Loader = new function(){
    var t=function(){
        var t = document.createElement('script');
        t.src='https://code.jquery.com/jquery-2.1.3.min.js',
        document.body.appendChild(t);
    };
    t();
}

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>