当鼠标进入/悬停在div上时,我有一个div想要反弹一次.
我在Chrome中使用的代码,但在Firefox或IE中没有.
在Chrome中,它会根据需要弹跳一次,但在FF和IE中,只要鼠标保持原位,弹跳就会继续.
我也试过$('#box').one("mouseenter", function() {但是盒子反弹一次,后来进入div的条目不会触发效果.
关于为什么浏览器表现不同以及我能做些什么的任何想法?
我有一个文档库站点,想要在编辑文档对象时发送电子邮件,其中包含更改的摘要.
数据库交互是使用DBContext的Code First Entities Framework
这是我到目前为止:
[HttpPost]
public ActionResult Edit(Document document, bool sendEmail, string commentsTextBox)
{
if (ModelState.IsValid)
{
docsDB.Entry(document).State = EntityState.Modified;
foreach (string propertyName in docsDB.Entry(document).OriginalValues.PropertyNames)
{
var OriginalValue = docsDB.Entry(document).OriginalValues.GetValue<object>(propertyName);
var NewValue = docsDB.Entry(document).CurrentValues.GetValue<object>(propertyName);
if (!OriginalValue.Equals(NewValue))
{
//capture the changes
}
}
docsDB.SaveChanges();
if (sendEmail)
{
//sends email
}
return RedirectToAction("Index");
}
Run Code Online (Sandbox Code Playgroud)
但是,OriginalValue和NewValue始终相同 - 更新的值.
有什么方法,缺少像写入文件那样的hacky,在POST之前捕获文档的状态?