0

I am loading a webview and on dom-ready I execute a function inside the webview like this:

webview.executeJavaScript("$('body').css({'left': '" + left + "', 'top':  '" + top + "' })" );

The problem is that webview cannot find reference to $. But I have jquery in my project. What could be the problem ?

1 Answer 1

0

Check out this stackoverflow question. You might just need to tell webview that you want to execute JQuery with something like this:

webview.executeJavaScript("jquery:function($('body').css({'left': '" + left + "', 'top':  '" + top + "' }))" );
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.