我为meteor.js创建了一个模板,我想要的是在tran_button上为onclick事件应用jQuery效果,效果的想法是与按钮关联的div消失.我没有通过流星控制台或firebug控制台得到任何错误.
Template.tran.events({
'click .tran_button' : function(){
$(this._id).slideUp('slow');
}
});
Run Code Online (Sandbox Code Playgroud)
谢谢.
我有一个在地图上显示折线的函数,这部分正在工作,现在我想实现一个隐藏折线的函数,但我找不到我的错误,提前致谢。
function cargaMapaCYL(mapa, varControl){
var limite = null;
limite = [
new google.maps.LatLng(42.49956716,-7.019005501),
new google.maps.LatLng(42.49947126,-7.029286373),
new google.maps.LatLng(42.50904062,-7.049299123),
new google.maps.LatLng(42.50722622,-7.069103626),
new google.maps.LatLng(42.50452387,-7.000150672),
new google.maps.LatLng(42.49348015,-6.983058917),
new google.maps.LatLng(42.49843269,-6.971666546),
new google.maps.LatLng(42.51765791,-6.956909023),
new google.maps.LatLng(42.52010069,-6.927429186),
new google.maps.LatLng(42.50992238,-6.914231493),
new google.maps.LatLng(42.50096695,-6.879679821),
new google.maps.LatLng(42.48775868,-6.857775832),
new google.maps.LatLng(43.23907504,-3.293216584)], "#000000", 5);
var contorno= new google.maps.Polyline({
path: limite,
strokeColor: "#000000",
strokeOpacity: 1.0,
strokeWeight: 2
});
if(varControl==true){
contorno.setMap(mapa);
}
if(varControl==false){
contorno.setMap(null);
}
}
Run Code Online (Sandbox Code Playgroud) I'm工作的一个*.po文件,我正尝试捕获所有的文字msgid ""和msgstr "",而不是真的很幸运,从来没有超过一个行:
msgid ""
"%s asdfgh asdsfgf asdfg %s even if you "
"asdfgdh sentences with no sense. We are not asking translate "
"Shakespeare's %s Hamlet %s !. %s testing regex %s "
"don't require specific industry knowledge. enjoying "
msgstr ""
Run Code Online (Sandbox Code Playgroud)
我试过的:
var myArray = fileContent.match(/msgid ([""'])(?:(?=(\\?))\2.)*?\1/g);
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助,我对正则表达式并不是很好:(
我最近开始使用Google Maps API v3.
我需要绘制一些位置(可能是3或4),同时将地图置于这些点的中心 - 而不是手动设置地图的长和纬度为中心...
有人可以分享一些提示,或指出我正确的方向?
提前致谢!担
function initialize() {
var latlng = new google.maps.LatLng(51.50816, 0.02712);
var myOptions = {
zoom: 12,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var firstmap = new google.maps.Map(document.getElementById("map"),myOptions);
//EVENT MARKER
var point = new google.maps.LatLng(51.50816, 0.02712);
var marker = new google.maps.Marker({
position:point,
map:firstmap,
title: 'ExCel London',
draggable:false,
icon:'images/event.png'
})
var contentstring = '<div>Hello World</div>'
var infoWindow = new google.maps.InfoWindow({
content:contentstring
});
//HOTEL 1 MARKER
var point = new google.maps.LatLng(51.503146, -0.113259);
var marker = new …Run Code Online (Sandbox Code Playgroud)