Share Coding

Tutorials, Problems, Stuffs …

Tag Archives: scroll

jQuery scroll to top not working

var $container = $('html, body, .divProductList');	

$scrollToTop.on('click',function(){
    
    $container.animate({
        scrollTop : 0
    }, 300);
    return false;
});

The magic is in the $container selector. Put your list, html, body into the target.

Programmatically disable Scroll function on Android WebView

WebView WebView1 = (WebView) findViewById(R.id.webView1);

//Only hide the scrollbar, not disables the scrolling:
WebView1.setVerticalScrollBarEnabled(false);
WebView1.setHorizontalScrollBarEnabled(false);

//Only disabled the horizontal scrolling:
WebView1.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);

//To disabled the horizontal and vertical scrolling:
webview.setOnTouchListener(new View.OnTouchListener() {
	public boolean onTouch(View v, MotionEvent event) {
		return (event.getAction() == MotionEvent.ACTION_MOVE);
	}
});