首页
\
问答
\
是否有一个jQuery选择器(h1,h2,h3,h4,h5或h6)?(Is there a jQuery selector for header (h1, h2, h3, h4, h5, or h6)?)
是否有一个jQuery选择器(h1,h2,h3,h4,h5或h6)?(Is there a jQuery selector for header (h1, h2, h3, h4, h5, or h6)?)
在jQuery中似乎没有办法确定节点是否为头,即h1,h2,h3,h4,h5或h6。 我想写一些如下所示的内容:
hNode$ = $(node).closest('h'); if(hNode$.length >0){ hNode$.css('padding-top', '+=' + 1); }
如果选中的行是标题,我会碰撞顶部填充。
我错过了什么吗?
谢谢
There doesn't seem to be a way in jQuery to tell if a node is a header, i.e., h1, h2, h3, h4, h5, or h6. I'd like to write something like:
hNode$ = $(node).closest('h'); if(hNode$.length >0){ hNode$.css('padding-top', '+=' + 1); }
where I bump the top padding if the selected line is a header.
Am I missing something?
Thanks
原文:https://stackoverflow.com/questions/28369872
更新时间:2022-06-13 12:06
最满意答案
在桌子上写一个触发器; 在你关心的价值上,将它记录到另一个表中; 在闲暇时从另一张桌子上选择。
Write a trigger on the table; on the value you care about, log it to another table; select from the other table at your leisure.
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
我已经使用cron完成了很多次。 因此,您的PHP脚本首先查看是否有新条目,然后执行它需要做的事情。 如果没有什么可以工作,它会立即退出。 要记住的一件事是,如果脚本需要很长时间才能运行,那么您需要确保相应地设置了cron作业,因此它们不会重叠。 实现此目的的一种简单方法是在表中使用一个特殊列,指示该行是否已由php脚本检查过。 因此,当php脚本运行时,它会查找该字段为false的所有数据。 像这样的东西: SELECT id from my_table where dealt_with = FALSE; ...
-
您可以添加触发器并让它们将行添加到审计表。 他们可以审核更改行的主键,甚至可以更改有关更改的其他信息。 例如,在UPDATE的情况下,他们可以记录已更改的列。 What version and edition of SQL Server? Is Change Data Capture available? – Martin Smith I am using SQL 2008 which supports Change Data Capture. Change Data Capture is a very r ...
-
监视MySQL表中的新数据(Monitor New Data in MySQL Table)[2021-11-12]
你的问题仍不清楚。 仅监视一种类型的更改 - 根据标题的“新数据”(INSERT) - 比检测任何更改更复杂(因为I want to detect the Changes in my table在注释中I want to detect the Changes in my table中I want to detect the Changes in my table更简单)。 MySql提供了获取表的校验和的方法: checksum table TABLE_NAME [QUICK | EXTENDED] In ... -
使用VBA监视更改方程中的初始数据的效果(Using VBA monitor the effect of changing initial data in an equation)[2021-09-27]
代码没有移动到下一行,因为Do Loop位于错误的位置。 例如: Do 'This is where you put the code you want to do for each line. Loop 如果使用Do Loop ,则不需要使用For Next (您只需要一个循环来执行您需要的操作)。 老实说,这就是我对上面的代码进行编码的方式: 未经测试 Option Explicit Sub Test() Dim sht1 As Worksheet Dim sht2 As Work ... -
从Rails应用程序中监视数据库表以获取外部更改(Monitor database table for external changes from within Rails application)[2022-05-18]
是的,你要么想要某种后台任务处理器(Delayed :: Job是最受欢迎的处理器之一,或者你可以使用守护程序库或类似程序伪装自己)或者设置一个按某种程度运行的cronjob 。 如果你想经常检查(每分钟,比如说),我建议使用Delayed :: Job路线,如果它更长(每小时左右),一个cron工作就可以了。 走DJ路线,你需要创建一个检查新记录的工作,如果有的话,处理它们,然后重新排队,因为每个工作在完成后都标记为“已完成”。 -Jon This is what I finally did: Use W ... -
抱歉,除了滚动您自己的通知机制之外,您没有任何其他选项。 其中一种方法是在要监视的表上创建触发器并测试字段级更新,将事件存储在辅助表中,并对应用程序进行编码以读取特定频率上的事件。 COLUMNS_UPDATED函数可以帮助您确定触发器中哪些字段已更改。 Sorry but you don't have any options available other than rolling your own notification mechanism. One of the ways you could do ...
-
监视表中的数据(Monitor the data in a table)[2023-10-09]
在桌子上写一个触发器; 在你关心的价值上,将它记录到另一个表中; 在闲暇时从另一张桌子上选择。 Write a trigger on the table; on the value you care about, log it to another table; select from the other table at your leisure. -
插入触发器将处理为您检测插入: CREATE TRIGGER my_on_before_trigger BEFORE INSERT ON the_table_you_want_to_monitor ... An insert trigger will handle detecting the insert for you: CREATE TRIGGER my_on_before_trigger BEFORE INSERT ON the_table_you_want_to_monitor . ...