- Details
- Written by: Stanko Milosev
- Category: jQuery
- Hits: 4534
For example, if you have JS file in which you want to call function from another js file, something like onClose event of datePicker:
test.js:
$(function() {
$('#datepicker').datepicker({dateFormat: 'yy-mm-dd',
onClose: function(dateText) {
myCall();
}
});
});
index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<script src="/test.js"></script>
<script>
var myTest = function myFunc() {
alert("test");
};
myCall = myTest;
</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker" /></p>
</body>
</html>
- Details
- Written by: Stanko Milosev
- Category: Bing Maps AJAX Control, Version 7.0
- Hits: 5191
It seems that there is one more bug. Polylines are disappearing if they are too big (i.e polyline which connects London with Sardinia) and if you zoom it.
Example you can see here, just zoom one line, zoom it until it disappears.
Also, in that file you can see example of adding viewchangeend event, which is fired also when zoom changes:
Microsoft.Maps.Events.addHandler(myMap, 'viewchangeend', addPins);
Then adding polylines:
var point1 = new Microsoft.Maps.Location(55, -2); var point2 = new Microsoft.Maps.Location(52, -2); var point3 = new Microsoft.Maps.Location(53, -1); var point4 = new Microsoft.Maps.Location(37.996162679728116, 8.701171874999998); var point5 = new Microsoft.Maps.Location(49.26780455063754, 8.701171874999998); var positions = new Array( point1 ,point2 ,point3 ,point4 ,point5 ); var poly = new Microsoft.Maps.Polyline( positions); myMap.entities.push(poly);