通过两个数据属性和排除数据属性获得 div

Get a div by two data attributes and by exclude data attributtes

我有一些这样的 div:

<div id="1" data-effect-in="swing" data-effect-out="bounce"></div>
<div id="2" data-effect-in="swing"></div>
<div id="3" data-effect-out="swing"></div>
<div id="4" data-effect-out data-effect-in="swing"></div>
<div id="5" data-effect-in data-effect-out="fadeIn"></div>

jsFiddle

我需要使用 jQuery 具有数据效果输入和数据效果输出的 div,并且这些属性的值不为空。

增加要求

我也需要得到具有数据效果输出且值不为空且没有数据效果输入的 div。

id是GUID(我不知道id,是从数据库生成的)

谢谢!!

具有 data-effect-in 和 data-effect-out 的 Div,并且这些属性的值不为空:

$("div[data-effect-in][data-effect-in!=''][data-effect-out][data-effect-out!='']")
// result: div#1

具有数据效果输出且值不为空且没有数据效果输入的 Div:

$("div[data-effect-out][data-effect-out!='']:not([data-effect-in])")
// result: div#3

这是我的 jsfiddle.