English 中文(简体)
如何在社会保障局使用职位?
原标题:How to use position in CSS?
<table id="tab">
    <tr><td class="here">dgd</td><td class="here">dfg</td></tr>
    <tr><td class="here">fgf</td><td class="here">sg4</td></tr>
</table>


<table id="new">
    <tr><td id="al">sss</td></tr>
</table>

#tab td {
  padding: 5px;
  border: solid 1px red;
}

#new td {
    padding: 5px;
    height: 40px;
      border: solid 1px green;
    background-color: green;
}

#new {
    display: none;
}

$(".here").click(function(){
   $("#new").show();
})

    $("#al").click(function(){
       alert( ok );
    })

LIVE: http://jsfiddle.net/HTHnK/

如何改变这一榜样,在酒吧增设职位? 我想——如果点击的话,那么table id = New 。 请让我在此点击TD。 此外,如果在表id = 新的外点击的话。 那么,这就应当掩盖。

如何做到这一点?

最佳回答

你们想要这样做吗?

rel=“nofollow”>http://jsfiddle.net/HTHnK/6/

问题回答

如果你再说绿箱应与被点击的囚室(通过绝对位置,而不是把它作为被点击的囚室的儿童)相移,那么你可以尝试这样的一些:

$(document).on("click", function(e) {
    var $el = $(e.target);
    if ($el.hasClass("here")) {
        $("#new").css({ left : e.target.offsetLeft,
                        top : e.target.offsetTop}).show();
    } else {
        $("#new").hide();
    }
});

哪些程序点击了该文件。 如果点击位于一个“圈子”的囚室,则它会移动绿箱,否则就会藏匿。

Demo: http://jsfiddle.net/HTHnK/16/

您是否希望将案文从源电池移至新的表层电池?

rel=“nofollow”>http://jsfiddle.net/dnrar/





相关问题
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!

热门标签