gpt4 book ai didi

javascript - Jquery 和框架

转载 作者:行者123 更新时间:2023-11-30 09:10:03 25 4
gpt4 key购买 nike

我目前正在开发一个 Web 应用程序,该应用程序是使用最多可向下拉伸(stretch) 5 倍的框架创建的,问题是我需要在整个网站上执行一些 jquery 魔法。

解决此问题的最佳方法是什么(除了我考虑过的重写之外)?

编辑:

框架结构是这样的:

Index.html
menu.html
banner.html
list.html
footer.html
/lib/index.html
header.html
body.html
footer.html

我所指的魔术是一些热键快捷方式,查找和替换这类东西

最佳答案

这就是你想要的:

$.frameReady()

frameReady lets you run jQuery commands in a target frame as if it were in the local document. It works much like the $(document).ready() function, waiting until the DOM is ready in the target frame before attempting to run your code. It will also load jQuery in the target frame for you if it doesn’t already exist and allows you to load other script files and stylesheets easily. frameReady supports nested frames and iframes in any combination, even dynamically created frames.

关于javascript - Jquery 和框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/754140/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com