如何查看网站上管理此点击展开内容的 JS 文件? [英] How to see which JS file governing this click-to-expand content on a website?

查看:63
本文介绍了如何查看网站上管理此点击展开内容的 JS 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看这个

在我点击加号后,

我看到

更改为
,并且 aria-expanded="false" 更改为aria-expanded=真".您能否详细说明如何确定哪个 JS 文件控制了这种行为?

我可以在事件监听器"部分看到很多 JS 文件;但想不通?

解决方案

我看了一下页面.从您的屏幕截图中,您可以看到click"上只有一个事件侦听器.适用于该特定标题元素 - amp-accordion.js.

这个名字很有意义,因为它是您正在查看的手风琴效果.

在引用的 .js 文件中,有许多部分控制手风琴效果.如果您想进一步调查,我建议您搜索术语手风琴".在 js 源代码中 - CTRL+F,手风琴".

I'm looking at this url. The original display is

After I click on the plus sign,

I see that <section> changes to <section expand>, and aria-expanded="false" changes to aria-expanded="true". Could you please elaborate on how to determine which JS file governs this behavior?

I can see many JS files in section "Event Listeners" but could not figure out?

解决方案

I had a look at the page. From your screenshot you can see there is only one of the event listeners on "click" that applies to that specific header element - amp-accordion.js.

This name makes sense as it is an accordion effect you're looking at.

Inside the .js file referenced there are a number of sections governing the accordion effect. If you'd like to investigate further I recommend searching for the term "accordion" in the js source - CTRL+F, "accordion".

这篇关于如何查看网站上管理此点击展开内容的 JS 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆