如果我把这种假装改成 j,这是否正确?
<>Prototype:
this.selected.observe( click , this.toggle.bindAsEventListener(this))
http://www.ohchr.org。
$j(this).bind( click ).toggle(this);
我怎么说?
如果我把这种假装改成 j,这是否正确?
<>Prototype:
this.selected.observe( click , this.toggle.bindAsEventListener(this))
http://www.ohchr.org。
$j(this).bind( click ).toggle(this);
我怎么说?
$(this).bind( click , function(){ $(this).toggle(); });
我唯一的混淆是,这在一开始? 通常,你会按照美元(可兑换)的思路做一些事情。
也可以使用:
$( .toggleable ).live( click , ...
相反。 这使在(文件)校外可使用的额外红利,因为如果将新的可控物体加上其点击事件,而不是约束所有现有可裂变材料,如果无证件的话。 不可能。
$j(this).click(function(){
$j(this).toggle();
});
注:.click(handler)
is a shortcut for .bind( Point ,handler)
I think you re looking for:
$(this).bind( click ,function () {
$(this)
}
牢记这一点指的是你在职能范围内使用该功能时的其他情况。 现在是你要求它做的事。 页: 1
$( #object ).bind( click , function() {
$(this) // this refers to the object
}
I have a menu consisting of an <ul> in a Web CMS. I want several menu items to have sub-items that are displayed in a dropdown list. These sub-items are <ul>s as well. This is basically ...
Hello i need to highlight a div after my page is loading, i don t know if i should use a partial or something like that, the partial also has to have 2 variables disponible. Code to highlight after ...
Does somebody know an unobtrusive, Prototype or no framework based way to turn a DIV with big content (e.g. a map) into a clickable and draggable "map" container with fixed dimensions, very much like ...
I have function in Javascript which works fine using prototype. The function is used to dynamicaly change a select field based on the selection of another field. var sizes_286 = new Array(); ...
This should be easy, but since I m new to programming, specially in javascript, I cannot figure it out. Let s say I have the following javascript code: var InjectClientValue = Class.create(); ...
I want to use some Scriptaculous effects on error messages. <% form_for(@page) do |f| %> <%= f.label :name %> <%= f.text_field :name %> <%= f.error_message_on "name" ...
As part of an ajax chat room (using prototype framework) I am working on I scroll the user to the bottom each time a message is added using the below js. However if the user has scrolled up and the ...
I can t find a work around for the innerHTML bug in IE7. I need to look at the contents of dynamicly generated HTML and change it if the text is "-1". I m using the prototype js gallery but couldn t ...