Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有将内容加载到相邻 div 的侧边栏导航链接(使用 jquery load())。
每次点击链接都会替换内容。
我需要在页面加载时默认将内容加载到 div 中,然后删除默认内容以替换为 load() 函数。
此时页面加载并将始终保留初始内容,并在通过单击链接激活每个 div 时替换其他附加 div。
我希望您在访问该目标 div 中的页面时看到一些内容,然后将其替换为来自这些侧边栏链接的新内容...
您可以通过在加载时调用 jQuery 中的 trigger() 方法手动触发锚点上的单击事件。