Skip to content

Instantly share code, notes, and snippets.

<script type="text/javascript">
var editor = new JCSDLGui($("#jcsdl"), {
//Change the speed of animation to 0
animate : 0,
//Sets the Map Overlay element color, opacity, and stroke
mapsOverlay : {
strokeWeight : 1,
strokeColor: '#ffffff',
<head>
...
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jcsdl/jcsdl.min.js"></script>
<script type="text/javascript" src="query/jcsdl.definition.js"></script>
<link rel="stylesheet" type="text/css" href="jcsdl/jcsdl.min.css" />
...
</head>
<body>
<script type="text/javascript">
var editor = new JCSDLGui($("#jcsdl"), {
different : {
//label : 'Different',
label : 'MyCustomLabelDifferent',
//description : 'Not equal to...',
description : 'My custom description...',
code : '!=',
url : 'http://dev.datasift.com/docs/operators/equals-and-not-equals'
<div id="jcsdl"></div>
<script type="text/javascript">
var editor = new JCSDLGui($("#jcsdl"), {
//Change the speed of animation to 0
animate : 0,
//Sets the Map Overlay element color, opacity, and stroke
mapsOverlay : {
<script type="text/javascript">
var editor = new JCSDLGui($("#jcsdl"), {
hideTargets : ['facebook', 'amazon.content']
});
</script>
<div id="jcsdl"></div>
<a href="#" id="load-jcsdl">Load query</a>
<textarea id="jcsdl-code">// JCSDL_MASTER b04591342ee71a2baa468d9d2a340ec8 AND
// JCSDL_VERSION 1.0
// JCSDL_START 0980a5f2ef935c4ed153bf975879eac0 twitter.text,contains_any,27-52
twitter.text contains_any "obama, santorum, gingrich, romney, ronpaul, ron paul"
// JCSDL_END
AND
<script type="text/javascript">
var editor = new JCSDLGui($("#jcsdl"), {
definition : {
targets : {
facebook : {
fields : {
'likes-count' : {
// name: 'Likes Count',
// type: 'int',
<script type="text/javascript">
var editor = new JCSDLGui($("#jcsdl"), {
definition : {
targets : {
facebook : {
fields : {
'likes-count' : {
max : 1000,
'default' : 500,
<script type="text/javascript">
$(function() {
var editor = new JCSDLGui('#jcsdl', {
save : function(code) {
alert(code);
}
});
});
</script>
text : {
arrayOperators : ['contains_any', 'contains_near', 'in'],
operator : 'contains_any'
}