I am trying to show only part of the website. I am trying to hide the slideshow. For some reason, my code doesn't work and it still shows the whole page. I searched the whole web but couldn't find an answer that worked out for me. I am still a beginner, so sorry if I make some dumb mistakes Thank you in advance!!
[Java]package com.example.myapplication;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends AppCompatActivity {
private WebView webView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

webView = (WebView) findViewById(R.id.webview);
webView.setWebViewClient(new WebViewClient());
webView.loadUrl("http://www.eventster.it");
webView.loadUrl("javascriptfunction() { " + "document.getElementsByClassName('main-carousel2')[0].style.display='none';})()");


WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
}



@Override
public void onBackPressed() {
if(webView.canGoBack()) {
webView.goBack();
} else {
super.onBackPressed();
}
}[/Java]