我正在使用twitter boostrap的popover来创建一个显示用户信息的悬停卡,我在这里触发mouseover检查jsfiddle上的popover.我想在它徘徊时保持这个popover活着.
<a href="#" id="example" class="btn btn-danger" rel="popover" >hover for popover</a>
$('#example').popover({
html : true,
trigger : 'manual',
content : function() {
return '<div class="box"></div>';
}
});
$(document).on('mouseover', '#example', function(){
$('#example').popover('show');
});
$(document).on('mouseleave', '#example', function(){
$('#example').popover('hide');
});
Run Code Online (Sandbox Code Playgroud)
你可以想到facebook悬停卡的工作.我想以同样的方式.我怎样才能做到这一点?
我有ArrayList,我想从中删除一个具有特殊价值的元素......
例如.
ArrayList<String> a=new ArrayList<String>();
a.add("abcd");
a.add("acbd");
a.add("dbca");
Run Code Online (Sandbox Code Playgroud)
我知道我们可以迭代arraylist和.remove()方法来删除元素,但我不知道如何在迭代时这样做.如何删除值为"acbd"的元素,即第二个元素?
我有一个链接,我将用作通知,当用户有一些新的通知我将通过显示工具提示(twitter bootstrap工具提示)通知用户.我想要实现的是,工具提示应该保持可见,直到用户点击链接.一旦用户点击链接,工具提示就应该销毁.这就是我现在所拥有的,http://jsfiddle.net/testtracker/QsYPv/
HTML
<p><a href="#" rel="tooltip" data-original-title="you have 2 notifications">Notification</a>.</p>?
Run Code Online (Sandbox Code Playgroud)
JavaScript的
$('p a').tooltip({placement: 'bottom'}).tooltip('show');?
Run Code Online (Sandbox Code Playgroud)
发生什么事情,工具提示保持可见,直到你将其悬停,并在你悬停它时采取默认行为(在悬停时显示).
我希望我已经提供了适当的信息,并清除了我想做的事情.
我的HTML页面是用英语写的,我看不到马来语中的任何文字,但是当我在Chrome浏览器中查看它时,它说"这个页面是马来语的,你喜欢翻译吗?" ....最新解决方案是删除它.
快照http://dl.dropbox.com/u/55938469/1.JPG
任何人都可以告诉我如何告诉浏览器这个页面是英文的,并且不要向查看此页面的任何人显示此警告.
可能重复:
在jquery中实现循环滚动条
我想创建垂直卷轴,它将像marquee一样工作.但我希望它是连续的,就像当我们使用选框时,整个内容只有在它完全上升后才会回来,但我希望它是连续的.
这就是我所拥有的...... http://jsfiddle.net/JWfaf/1/
我只希望在一个方向上继续滚动.我希望我已经清除了我想要实现的目标
HTML
<div class="con">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>?
Run Code Online (Sandbox Code Playgroud)
JavaScript的
function animatethis(targetElement, speed) {
$(targetElement).animate({ marginTop: "+=250px"},
{
duration: speed,
complete: function ()
{
targetElement.animate({ marginTop: "-=250px" },
{
duration: speed,
complete: function ()
{
animatethis(targetElement, speed);
}
});
}
});
};
animatethis($('.con ul li:first-child'), 10000);?
Run Code Online (Sandbox Code Playgroud) 我想检查字符串是否是使用java regex的facebook的URL.
例如:facebook.com/username
如果是协议http或https
http://www.facebook.com/xyz https://www.facebook.com/xyz它也应该匹配
或没有协议也
www.facebook.com/xyz
我有两个arraylist
ArrayList<String> a1
ArrayList<String> a2
Run Code Online (Sandbox Code Playgroud)
我想检查a1的所有元素是否都存在于a2中.这就是我正在尝试从SO问题得到的东西
if (Arrays.asList(a2).containsAll(Arrays.asList(a1)))
{a2ContainsA1=true;}
Run Code Online (Sandbox Code Playgroud)
这没有给出一致的结果......有没有其他方法这样做?
我将clob数据插入mysql数据库......这是我的代码
Clob cl=dbCon.createClob();
cl.setString(1,userAbout);
dbCon.setAutoCommit(false);
PreparedStatement insertClob=dbCon.prepareStatement("UPDATE user_data SET user_about=? WHERE user_id=?");
insertClob.setClob(1,cl);
insertClob.setInt(2,userId);
int count= insertClob.executeUpdate();
if(count==1){dbCon.commit();dbCon.close();out.write("success");}
else{dbCon.rollback();dbCon.close();out.print("error");}
Run Code Online (Sandbox Code Playgroud)
这是一个例外
java.lang.AbstractMethodError: org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.createClob()Ljava/sql/Clob;
Run Code Online (Sandbox Code Playgroud)
这是什么问题?我该如何解决?
java ×4
arraylist ×2
collections ×2
javascript ×2
jquery ×2
clob ×1
html ×1
jdbc ×1
marquee ×1
onhover ×1
popover ×1
regex ×1
scroller ×1
tooltip ×1
translation ×1