$.ajax({
...
success: function(data) {
var singlePosition = new google.maps.LatLng(data.props[0].lat, data.props[0].lng);
var request = {
origin: coords,
destination: singlePosition,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
directionsService.route(...);
...
},
...
});
$('form').submit( function(event) {
var form = this;
event.preventDefault();
setTimeout( function () {
form.submit();
}, 300);
});
ymaps.ready(function() {
const old_Map = ymaps.Map;
ymaps.Map = function() {
var args = Array.prototype.slice.call(arguments);
args.unshift(0);
var obj = new (Function.prototype.bind.apply(old_Map, args));
document.getElementById(args[1]).yaMap = obj;
return obj;
}
});
document.getElementById('himki').yaMap
MiniWidget: function(options) {
this.id = TradingView.gId();
this.options = {
whitelabel: options.whitelabel || "",
width: TradingView.WidgetAbstract.prototype.fixSize(options.width) || 300,
height: TradingView.WidgetAbstract.prototype.fixSize(options.height) || 400,
symbols: options.symbols,
tabs: options.tabs || "",
symbols_description: options.symbols_description || "",
customer: options.customer || "",
container: options.container_id || "",
large_chart_url: options.large_chart_url || "",
large_chart_target: options.large_chart_target || "",
gridLineColor: options.gridLineColor || "",
fontColor: options.fontColor || "",
underLineColor: options.underLineColor || "",
trendLineColor: options.trendLineColor || "",
timeAxisBackgroundColor: options.timeAxisBackgroundColor || "",
activeTickerBackgroundColor: options.activeTickerBackgroundColor || "",
noGraph: options.noGraph || false,
locale: options.locale,
styleTickerActiveBg: options.styleTickerActiveBg || "",
styleTabActiveBorderColor: options.styleTabActiveBorderColor || "",
styleTickerBodyFontSize: options.styleTickerBodyFontSize || "",
styleTickerBodyFontWeight: options.styleTickerBodyFontWeight || "",
styleTickerHeadFontSize: options.styleTickerHeadFontSize || "",
styleTickerHeadFontWeight: options.styleTickerHeadFontWeight || "",
styleTickerChangeDownColor: options.styleTickerChangeDownColor || "",
styleTickerChangeUpColor: options.styleTickerChangeUpColor || "",
styleTickerLastDownBg: options.styleTickerLastDownBg || "",
styleTickerLastUpBg: options.styleTickerLastUpBg || "",
styleTickerSymbolColor: options.styleTickerSymbolColor || "",
styleTickerSymbolHoverTextDecoration: options.styleTickerSymbolHoverTextDecoration || "",
styleTickerActiveSymbolTextDecoration: options.styleTickerActiveSymbolTextDecoration || "",
styleTabsActiveBorderColor: options.styleTabsActiveBorderColor || "",
styleTabsNoBorder: options.styleTabsNoBorder || "",
styleWidgetNoBorder: options.styleWidgetNoBorder || ""
};
this.createWidget()
}
Allow multiple notifications to be displayed by setting the notification
tag property if supplied. Notifications with identical tags will replace
each other.
const keys = [1,2,3,4,7];
const final_object = {};
for (var i = 0; i < keys.length; i++) {
final_object[ keys[i] ] = { current: 0, default: 1 };
}
const keys = [1,2,3,4,7];
const final_object = {};
const UnknownObject = function() {
this.current = 0;
this.default = 1;
}
for (var i = 0; i < keys.length; i++) {
final_object[ keys[i] ] = new UnknownObject();
}
cannot read property 'lat' of undefined
<a class="gallery" href="#testube"><img alt="" src="images/atb_s.jpg" /></a>
<div style="display:none" id="testube">
<!-- HTML - код ролика -->
<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/sh08XGBE8qc&hl=ru&fs=1"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/sh08XGBE8qc&hl=ru&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>
</object>
</div>
el.onAppearanceApply( function(){
console.log( this.is( el ) ); // true
} );