【发布时间】:2010-10-24 20:34:48
【问题描述】:
$(document).ready(function () {
$('#createGallery').hide();
$("#newGallery").click(function () {
$("#createGallery").show('slow');
});
$("#gallerySelect > option").not("#newGallery").click(function () {
$("#createGallery").hide('slow');
});
});
我不知道为什么。似乎很容易。我的 HTML 在 HAML 中。但是如果您不知道 HAML 是什么,它很容易理解。我的 HAML 内容如下:
#createGallery
%span{ :style => "color:#1B75BC; font-size: 15px;" }
new gallery
%br
%form{ :action => ""}
%input{ :name => "tabname", :type => "text", :rows => "1", :cols => "30", :style => "height: 15px; width: 260px; margin-right: 40px;"}
%span{ :style => "color:#1B75BC; font-size: 15px;" }
gallery
%form{ :action => ""}
%select#gallerySelect{ :name => "Choose Gallery", :style => "width:260px" }
%option{ :selected => "selected", :value => "QuickFact" }
Choose Gallery
%option{ :value => "QuickFact"}
My Interior Design
%option#newGallery{ :value => "QuickFact" }
New Gallery
%br
【问题讨论】:
-
它在其他浏览器中是否有效?你的标题暗示了它,但它并不明确。
标签: javascript jquery internet-explorer cross-browser show-hide