Skip to content

Instantly share code, notes, and snippets.

var arr = [{
name: 'a'
}, {
name: 'b'
}]
for(var index in arr) {
var obj = arr[index];
if(obj.name == 'a') {
// iets doen
var arr = [{
name: 'a'
}, {
name: 'b'
}]
$.each(arr, function(index, obj) {
if(obj.name == 'a') {
// iets doen
}
$.each($("#select1 > option"), function (index, item) {
var found = false;
$.each($("#select2 > option"), function (index1, item1) {
if(item1.text == item.text) {
found = true;
}
});
if(found) {
$(item).css("background-color", "red");
<template>
<ak-chart k-title.bind="{text: 'TEST'}"
k-data-source.bind="datasource"
k-legend.bind="{position: 'bottom'}"
k-series.bind="series"
k-series-defaults.bind="seriesDefaults"
k-series-axis.bind="seriesValueAxis"
k-category-axis.bind="seriesCategoryAxis"
k-tooltip.bind="seriesTooltip">
</ak-chart>
import {logger} from 'shared/components/utilities/logger';
export function withSpinner(target, key, descriptor) {
let ptr = descriptor.value;
descriptor.value = function(...args) {
if (this.spinner) {
this.spinner.setLoading(true);
}
return ptr.apply(this, args)
.then(() => {
import {inject} from 'aurelia-framework';
import {HttpClient} from 'aurelia-http-client';
@inject(HttpClient)
export class BasicUse {
constructor(httpClient) {
this.httpClient = httpClient;
}
@JeroenVinke
JeroenVinke / app.html
Created April 9, 2016 11:59
Aurelia - JQueryUI DatePicker
<template>
<router-view></router-view>
</template>
@JeroenVinke
JeroenVinke / app.html
Created April 10, 2016 06:25
Aurelia - JQueryUI DatePicker
<template>
<button ak-button>test</button>
</template>
@JeroenVinke
JeroenVinke / app.html
Created April 10, 2016 06:33
Aurelia - JQueryUI DatePicker
<template>
<div id="pendingChangesWindow"
ak-window="k-width: 525px;
k-title: Pending Changes;
k-actions.bind: actions;
k-visible.bind: false;
k-widget.bind: window"
k-on-close.delegate="onClose()">
<div>
@JeroenVinke
JeroenVinke / app.html
Created April 11, 2016 15:36 — forked from adriatic/app.html
Area charts: binding to remote data
<template>
<ak-chart k-title.bind="{text: 'Spain electricity production (GWh)'}"
k-data-source.bind="datasource"
k-legend.bind="{position: 'top'}"
k-series.bind="series"
k-series-defaults.bind="{type: 'area'}"
k-value-axis.bind="valueAxis"
k-category-axis.bind="categoryAxis"
k-tooltip.bind="tooltip">
</ak-chart>