Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/450.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 调试BackboneJS单击事件_Javascript_Jquery_Html_Backbone.js - Fatal编程技术网

Javascript 调试BackboneJS单击事件

Javascript 调试BackboneJS单击事件,javascript,jquery,html,backbone.js,Javascript,Jquery,Html,Backbone.js,我不确定我这样做是不是错了。我想找出打开模态窗口的代码。当我单击缩略图时,会弹出模式窗口。我右键单击缩略图并选择Inspect元素,下面是我得到的代码 <div class="carouselItem thumbnail" data-id="id-470" data-type="document" data-automation="sectionCarouselItem"> <img src="/assets/img/dsgd23.jpg" data-automation=

我不确定我这样做是不是错了。我想找出打开模态窗口的代码。当我单击缩略图时,会弹出模式窗口。我右键单击缩略图并选择Inspect元素,下面是我得到的代码

<div class="carouselItem thumbnail" data-id="id-470" data-type="document" data-automation="sectionCarouselItem">
  <img src="/assets/img/dsgd23.jpg" data-automation="resourceBoxArt">
  <div class="text_here title">
    <span data-automation="textTitle">Gandhi</span>
  </div>
</div>
在chromedevtools的右侧,当我在Elements选项卡first选项卡中时,我单击了eventlisteners。我看到了不同的事件,比如单击、按键、向下键、鼠标向下键、鼠标出键等等。当我单击比如说单击事件时,我看到了body、div和document,但在它旁边,是jquery.js。我正在本地开发,我有可用的源地图并已启用。这对我没有帮助


我也试过Chrome的时间线,但它只是捕捉了大量的东西,我几乎找不到它是点击事件、鼠标下移事件还是鼠标下移事件。

我知道你在描述一个问题,但这里有问题吗?您的视图负责委派事件,因为您已经包括jquery,它将通过它委派。要调试单击事件,可以使用开发工具中的“源”选项卡,并在触发单击事件时运行的代码上设置断点。经过数小时的故障排除,我找到了一个断点,但还有一个断点非常复杂。