Skip to content

Instantly share code, notes, and snippets.

@lohithgn
Last active December 16, 2015 12:09
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/5432714 to your computer and use it in GitHub Desktop.
Save lohithgn/5432714 to your computer and use it in GitHub Desktop.
Client Side selection of Color Picker
<p>
@(Html.Kendo().ColorPalette()
.Name("color-chooser")
.Palette(new string[] { "#ddd1c3", "#d2d2d2",
"#746153", "#3a4c8b",
"#ffcc33", "#fb455f",
"#ac120f" })
.Value("#ffcc33")
.TileSize(30)
)
</p>
<script>
$(document).ready(function () {
var colorPicker = $("#color-chooser").data("kendoColorPalette");
var selectedColor = colorPicker.value();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment