开发者

Position Div onclick on another div with Multiple instances on a page using JQuery

Here is my problem http://jsfiddle.net/shoppyonline/re6r7/

I'm trying to get .req_menu to show on each row its clicked开发者_如何学JAVA on.


Is this the result that you're after?

http://jsfiddle.net/2c2YJ/

I removed the CSS on .rec_menu so it's not absolute, and also updated the jQuery selector to match the correct .rec_menu div and not all of them.

UPDATE: http://jsfiddle.net/dZmEj/


You need to use absolute position and calculate relative offset and position next to it.

http://api.jquery.com/offset/

get the offset values// and use

jquery .css left values to position next to it.


I noticed the height of your .rec_btns is 0, so it's not clickable.

Add overflow: auto to .rec_btns, the anchor inside it is a float.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜