Skip to content

Instantly share code, notes, and snippets.

@lohithgn
Created April 22, 2013 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lohithgn/5432764 to your computer and use it in GitHub Desktop.
Save lohithgn/5432764 to your computer and use it in GitHub Desktop.
Get/Set Value of Color Picker from client side
<p>
@(Html.Kendo().ColorPalette()
.Name("color-chooser")
.Palette(new string[] { "#ddd1c3", "#d2d2d2",
"#746153", "#3a4c8b",
"#ffcc33", "#fb455f",
"#ac120f" })
.TileSize(30)
)
</p>
<script>
$(document).ready(function () {
var colorPicker = $("#color-chooser").data("kendoColorPalette");
colorPicker.value("#ffcc33");
var selectedColor = colorPicker.value();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment