Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jquery移动标题-使用图像作为页面链接_Jquery_Css_Jquery Mobile_Mobile_Header - Fatal编程技术网

jquery移动标题-使用图像作为页面链接

jquery移动标题-使用图像作为页面链接,jquery,css,jquery-mobile,mobile,header,Jquery,Css,Jquery Mobile,Mobile,Header,我正在尝试基本上使用标题中的购物车图像作为指向另一个页面(订单页面)的链接,该页面包含添加到用户购物车的项目列表 我把一切都做得很好,只是图像没有链接到订单页面 以下是我所拥有的: <div data-role="header" data-theme="a"> <h1>Menu</h1> <img src="img/cartEmpty.png" class="ui-btn-right" id="cart_logo"> &l

我正在尝试基本上使用标题中的购物车图像作为指向另一个页面(订单页面)的链接,该页面包含添加到用户购物车的项目列表

我把一切都做得很好,只是图像没有链接到订单页面

以下是我所拥有的:

 <div data-role="header" data-theme="a">
    <h1>Menu</h1>
    <img src="img/cartEmpty.png" class="ui-btn-right" id="cart_logo">
    <label id="items_in_cart" class="ui-btn-right"></label>
  </div>
这就是我目前拥有的,这使得图像变得太大了。我只想对购物车图像进行缩放,使其保留在标题中,同时也是指向订单页面的链接:

<div data-role="header" data-theme="a">
    <h1>Menu</h1>
    <a href="#order" class="ui-btn-right"><img src="img/cartEmpty.png" id="cart_logo"></a>
    <label id="items_in_cart" class="ui-btn-right"></label>
</div>

菜单
要更好地了解我正在尝试做什么,请参阅亚马逊的购物车图片


我正在使用jquery mobile 1.4.5

我需要检查您的页面,看看它为什么不工作,但我怀疑该图像需要是按钮上的背景图像。但是,您为图像提供了一个id=“cart_logo”,这样您就可以创建一个点击事件来转到订单页面,例如($(文档)
<div data-role="header" data-theme="a">
    <h1>Menu</h1>
    <a href="#order" class="ui-btn-right"><img src="img/cartEmpty.png" id="cart_logo"></a>
    <label id="items_in_cart" class="ui-btn-right"></label>
</div>