Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to hidden a div #416

Closed
codlin opened this issue May 13, 2019 · 4 comments
Closed

How to hidden a div #416

codlin opened this issue May 13, 2019 · 4 comments

Comments

@codlin
Copy link

codlin commented May 13, 2019

I want to load a url, then modify the div element of the html, e.g.:
from
<div class="goods-bottom-bar"></div>
to
<div class="goods-bottom-bar" style="display:none;"></div>
then display in flutter widget.
Does the plugin have API to achieve this?

Thanks.

@adammesa
Copy link

Use the evalJavascript function to do this. For example, if the page in WebView has jQuery already running, this would work:
flutterWebViewPlugin.evalJavascript("$('goods-bottom-bar').css('display', 'none');");

@charafau
Copy link
Collaborator

thanks @muffinjello for help. that's the correct answer. closing

@codlin
Copy link
Author

codlin commented May 31, 2019

@muffinjello Thanks a lot.

@Jazzykhan
Copy link

where to paste this line i want to hide menu from my webview?
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants