将child css类添加到父css类以进行下拉

时间:2013-12-13 17:50:44

标签: javascript jquery css primefaces

我正在尝试将子css类添加到父css类以获取下拉菜单。当用户单击名为.linkBox的父css类时,它会弹出一个下拉列表。需要出现的子css类是css生成的箭头。我的箭头居中,但我试图让箭头出现的一切都没有用。我必须同时使用它们作为css类,它们不能是ID。第二部分是箭头只会影响标题中的第一个和第三个框。另一个问题是该项目需要使用PrimeFaces,我认为这可能是让我失望的一部分。这是我到目前为止 -

 $('.linkBox').hover (function () {
       $(this).parent('.linkBox').children('p').addClass("ddArrow");
  },function () {
    $(this).parent('.linkBox').children('p').removeClass("ddArrow");
  }
);

PrimeFaces代码是 -

 <p:panel id="profileDropDown" styleClass="linkBox profileBox">

帮助我已经坚持了几天! 谢谢!!!!

0 个答案:

没有答案