答案 0 :(得分:3)
您可以使用CREATE OR REPLACE TRIGGER AFTERIUDLIQUIDATIONSDETAILS
BEFORE INSERT OR DELETE
ON LIQUIDATIONSDETAILS
FOR EACH ROW
--WHEN (NEW.PERIODID <> FN_PERIODNEXT)
BEGIN
If FN_PERIODNEXT <> :NEW.PERIOD
then
IF INSERTING
THEN
UPDATE APPOINTSOFCAS
SET INLD = INLD + 1
WHERE CUSTOMERID = :NEW.CUSTOMERID
AND ID = :NEW.APPOINTOFCAID
AND KINDCONTROLID = :NEW.KINDCONTROLID;
END IF;
IF DELETING
THEN
UPDATE APPOINTSOFCAS
SET INLD = INLD - 1
WHERE CUSTOMERID = :OLD.CUSTOMERID
AND ID = :OLD.APPOINTOFCAID
AND KINDCONTROLID = :OLD.KINDCONTROLID;
END IF;
END IF;
END;
/
以及.newsPostContainer p
排除:not()
元素:
.postDate
或者,如果您可以保证目标$('.newsPostContainer p:not(.postDate)').addClass('posteExcerpt');
始终以p
开头,那么您可以选择兄弟姐妹:
p.postDate
答案 1 :(得分:1)
检查遍历的'P'标签是否具有'postDate'类,如果没有,这是第二个'P'标签和addClass。
:not
已实现,您也可以使用df = df.reindex(columns = header_list)
。
答案 2 :(得分:0)
p.postDate + p
会选择p
后面的所有p.postDate
$(".newsPostContainer p.postDate + p").addClass('posteExcerpt')
&#13;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="newsPostContainer ">
<p class="postDate">postDate</p>
<p>posteExcerpt</p>
<p class="postDate">postDate</p>
<p>posteExcerpt</p>
<p class="postDate">postDate</p>
<p>posteExcerpt</p>
<p class="postDate">postDate</p>
<p>posteExcerpt</p>
<p class="postDate">postDate</p>
<p>posteExcerpt</p>
</div>
&#13;