show only one div within an iframe (javascript, JQuery…)

后端 未结 3 865
梦谈多话
梦谈多话 2021-01-11 16:13

First just let me say I\'m open to ideas on a different approach altogether.

I have and iframe as such:

3条回答
  •  醉梦人生
    2021-01-11 16:28

    With jQuery, you can load not just the contents of a URL, but a specific CSS selector from within that URL. This would be a much cleaner approach. It's like this.

    $("#area").load("something.html #content");
    

    Via CSS Tricks

提交回复
热议问题