English 中文(简体)
IE, j Query on div (jsfiddle)未登记的浮标活动
原标题:Click event not registered in IE, jQuery on div (jsfiddle)

我看着:

<h3>Sample</h3>
<div class="skjemaHjelp" id="sample"><div><h3>3</h3><p>Content goes here</p></div></div>
<input type="text"  class="inputWide" name="formSample" id="formSample" value="" />

class Hjelp在投入现场的右侧穿孔,在助电线上作风。 The content within .skjema Hjelp div是隐蔽的。

我的祝福是:

$( .skjemaHjelp, .skjemaHjelpU ).click(function () {
alert( debug );
}):

除IE外,每个浏览器都有警报箱。 由于某种原因,这一事件没有火灾。 我对此没有想法。 是否有任何工作?

JSFiddle http://jsfiddle.net/wJEPV/11/

Thomas

最佳回答

假设你将IE重新测试低于9版(或IE9, 采用不同的文件方式),那么你支离破碎的唯一问题是:<代码>console<<<<<<<>/code>的物体没有界定。

如果你删除<代码>console.log(装上);,则该编码在各种版本的IEC中发挥作用。

在早期版本的国际环境法中,console的物体只有在您开放开发工具时方可界定(打上F12)。

或者,你可以添加这样的内容,使使用<条码>console.*始终安全:

// make it safe to use console.log always
(function(b){function c(){}for(var d="assert,clear,count,debug,dir,dirxml,error,exception,firebug,group,groupCollapsed,groupEnd,info,log,memoryProfile,memoryProfileEnd,profile,profileEnd,table,time,timeEnd,timeStamp,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try
{console.log();return window.console;}catch(err){return window.console={};}})());

(snippet taken from http://html5boilerplate.com/)

问题回答

添加<条形码>=0” 财产到您的四处。 这将使网站<代码>click活动发生火灾。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签