I want to load external websites inside div and make it a bit smaller to accommodate inside div more properly.
just like Google search do
I tried this:
$("#targetDiv").load("www.google.com");
but it is not working.
I tried iframe but it has still 2 problems:
- scrolling is still enabled by pressing arrow keys & PGUP PGDOWN
- how to make contents inside iframe smaller
Don’t know which method i should use
which is more optimized
or any alternative?
You are not going to be able to load a cross domain ajax call like that with jquery. from http://api.jquery.com/load/
If iframe is not an option you can retrieve the data via an ajax call to a php page using curl.