最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

.triggerHandler()

.triggerHandler( eventType, extraParameters ) Returns: Object

Description: Execute all handlers attached to an element for an event.

  • version added: 1.2.triggerHandler( eventType, extraParameters )

    eventTypeA string containing a JavaScript event type, such as click or submit.

    extraParametersAn array of additional parameters to pass along to the event handler.

The .triggerHandler() method behaves similarly to .trigger(), with the following exceptions:

  • The .triggerHandler() method does not cause the default behavior of an event to occur (such as a form submission).
  • While .trigger() will operate on all elements matched by the jQuery object, .triggerHandler() only affects the first matched element.
  • Events created with .triggerHandler() do not bubble up the DOM hierarchy; if they are not handled by the target element directly, they do nothing.
  • Instead of returning the jQuery object (to allow chaining), .triggerHandler() returns whatever value was returned by the last handler it caused to be executed. If no handlers are triggered, it returns undefined

For more information on this method, see the discussion for .trigger().

Example:

If you called .triggerHandler() on a focus event - the browser's default focus action would not be triggered, only the event handlers bound to the focus event.

<!DOCTYPE html>
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
  <button id="old">.trigger("focus")</button>
<button id="new">.triggerHandler("focus")</button><br/><br/>

<input type="text" value="To Be Focused"/>
<script>

$("#old").click(function(){
$("input").trigger("focus");
});
$("#new").click(function(){
$("input").triggerHandler("focus");
});
$("input").focus(function(){
$("<span>Focused!</span>").appendTo("body").fadeOut(1000);
});

</script>

</body>
</html>

Demo:

jQuery 1.6 API 中文版腳本之家整理、修訂 (2011年6月)
孝昌县| 景宁| 垫江县| 太白县| 韶山市| 虹口区| 桑日县| 交口县| 府谷县| 漳平市| 桐庐县| 金昌市| 汉阴县| 大化| 莱西市| 高州市| 青田县| 马关县| 任丘市| 桦南县| 获嘉县| 全南县| 彭州市| 来凤县| 三穗县| 中宁县| 双流县| 蓬安县| 宁乡县| 铜陵市| 虎林市| 三河市| 河北省| 石阡县| 上饶市| 新巴尔虎右旗| 都安| 简阳市| 三门县| 大化| 临颍县|