Javascript 通过将按钮事件放置在nivo图像滑块中的图像上,按钮事件不起作用
我正在使用jquery nivo滑块插件。在演示中提供了html标题(沿html标题的单个图像)。我尝试添加一个按钮而不是html标题。单击按钮将触发某些事件。图像的html标题已使用这种方式放置Javascript 通过将按钮事件放置在nivo图像滑块中的图像上,按钮事件不起作用,javascript,jquery,html,magento,nivo-slider,Javascript,Jquery,Html,Magento,Nivo Slider,我正在使用jquery nivo滑块插件。在演示中提供了html标题(沿html标题的单个图像)。我尝试添加一个按钮而不是html标题。单击按钮将触发某些事件。图像的html标题已使用这种方式放置 <div id="slider" class="nivoSlider"> <img src="{{media url=" wysiwyg/toystory.jpg "}}" alt="" /> <a href="#"> <img title="This
<div id="slider" class="nivoSlider">
<img src="{{media url=" wysiwyg/toystory.jpg "}}" alt="" />
<a href="#">
<img title="This is an example of a caption " src="{{media url=" wysiwyg/up.jpg "}}" alt="" />
</a>
<img src="{{media url=" wysiwyg/walle.jpg "}}" alt="" data-transition="slideInLeft" />
<img title="htmlcaption" src="{{media url=" wysiwyg/nemo.jpg "}}" alt="" />
实际上,我在magento中使用这个插件来创建主页滑块。对滑块执行按钮操作的任何其他方法也有助于克服此问题。给我提一些想法真的有助于解决这个问题。提前感谢。当您单击按钮时。是否将消息显示为JQuery未定义?Sizzle,jQuery的选择器引擎不会以这种方式找到按钮,因为它不会在属性值中查找HTML元素。Nope@PradeepSanku is不显示jQuery未定义。@MarcellFülöp但插件已经使用这种方法显示HTML标题。所以我试过这种方法,但听起来不太好。
<img title="<button id='adbtn'>hello</button>" src="{{media url=" wysiwyg/walle.jpg "}}" alt="" />
jQuery('#adbtn').click(function(){alert('hello btn');});