inspector

Using Chrome, how to find to which events are bound to an element

杀马特。学长 韩版系。学妹 提交于 2019-11-26 11:42:52
Let suppose I've a link on my page: <a href="#" id="foo">Click Here</a> I don't know anything else, but when I click on the link, an alert("bar") is displayed. So I know that somewhere, some code is getting binded to #foo. How can I find the code that is binding the alert("bar") to the click event ? I'm looking for a solution with Chrome. Ps.: The example is fictive, so I'm not looking for solution like: "Use XXXXXX and search the whole project for "alert(\"bar\")". I want a real debugging/tracing solution. Using Chrome 15.0.865.0 dev . There's an "Event Listeners" section on the Elements

What does it mean when a CSS rule is grayed out in Chrome&#39;s element inspector?

梦想的初衷 提交于 2019-11-26 07:57:27
问题 I\'m inspecting an h2 element on a web page using Google Chrome\'s element inspector and some of the CSS rules--which appear to be applied--are grayed out. It seems that a strike-through indicates that a rule was overridden, but what does it mean when a style is grayed out? 回答1: For me the current answers didn't explain the issue fully enough, so I am adding this answer which hopefully might be useful to others. Greyed/dimmed out text, can mean either it's a default rule/property the browser

Chrome Developer Tools: How to find out what is overriding a CSS rule?

浪尽此生 提交于 2019-11-26 06:57:34
问题 Well, this is pretty straightforward. If Chrome\'s Developer Tools is showing me that a style is overridden, how to see what CSS rule is overriding it? I want to know if is there anything like \"Show me what overrides this\" . OBS: Please, don\'t point me to Firebug. 回答1: Use the Computed Style panel of the element inspector. Expand the property of interest to see the list of applicable rules, and which one won. 回答2: You can simply look at the ones with the same name which aren't striked out,

Using Chrome, how to find to which events are bound to an element

社会主义新天地 提交于 2019-11-26 02:30:10
问题 Lets suppose I\'ve a link on my page: <a href=\"#\" id=\"foo\">Click Here</a> I don\'t know anything else, but when I click on the link, an alert(\"bar\") is displayed. So I know that somewhere, some code is getting bound to #foo . How can I find the code that is binding the alert(\"bar\") to the click event? I\'m looking for a solution with Chrome. Ps.: The example is fictive, so I\'m not looking for solution like: \"Use XXXXXX and search the whole project for \"alert(\\\"bar\\\")\". I want