时失去跟踪的图像文件夹的这是我和它的工作原理:MVC局部视图使用jQuery
$(function(){
$('.slide-out-div').tabSlideOut({
tabHandle: '.handle', //class of the element that will become your tab
pathToTabImage: 'http://mhmiisdev2/images/contact_tab.gif', //path to the image for the tab //Optionally can be set using css
imageHeight: '122px', //height of tab image //Optionally can be set using css
imageWidth: '40px', //width of tab image //Optionally can be set using css
tabLocation: 'right', //side of screen where tab lives, top, right, bottom, or left
speed: 300, //speed of animation
action: 'click', //options: 'click' or 'hover', action to trigger animation
topPos: '200px', //position from the top/ use if tabLocation is left or right
leftPos: '20px', //position from left/ use if tabLocation is bottom or top
fixedPosition: true //options: true makes it stick(fixed position) on scroll
});
});
这就是我想要的东西,当我从一个控制器切换到另一个控制器,它不工作。请注意图片的路径不是绝对
$(function(){
$('.slide-out-div').tabSlideOut({
tabHandle: '.handle', //class of the element that will become your tab
pathToTabImage: '/images/contact_tab.gif', //path to the image for the tab //Optionally can be set using css
imageHeight: '122px', //height of tab image //Optionally can be set using css
imageWidth: '40px', //width of tab image //Optionally can be set using css
tabLocation: 'right', //side of screen where tab lives, top, right, bottom, or left
speed: 300, //speed of animation
action: 'click', //options: 'click' or 'hover', action to trigger animation
topPos: '200px', //position from the top/ use if tabLocation is left or right
leftPos: '20px', //position from left/ use if tabLocation is bottom or top
fixedPosition: true //options: true makes it stick(fixed position) on scroll
});
});
的HTML完整性....
<div class="slide-out-div">
<a class="handle" href="http://link-for-non-js-users.html">Content</a>
<h3>Medical Variance Reports</h3>
<div>
<ul>
<li><a href="http://mhmssrs2/Reports/Pages/Report.aspx?" target="_blank">Individual Medicines</a></li>
</ul>
</div>
</div>
我怀疑某种程度上pathToTabImage: /images/contact_tab.gif'
浏览throught控制器时,失去了它的背景。浏览throught控制器时/images/contact_tab.gif”失去它 方面:帮助我理解......
是否有一个jQuery相当于MVC到@urlcontent? – hidden 2012-03-19 23:17:01
你的图像在哪里搜索?在控制台或“资源”页面中,您应该可以看到图像已被搜索的位置。 – 2012-03-19 23:22:31