1
0
mirror of synced 2024-11-26 23:06:02 +03:00

Merge pull request #1251 from juliankrispel/gh-pages

Demo Page - Prevent passing dom elements into JSON.stringify
This commit is contained in:
Igor Vaynberg 2013-05-06 09:36:29 -07:00
commit 0da89840ed

View File

@ -570,7 +570,7 @@ $("#e8").select2();
$("#e8_get").click(function () { alert("Selected value is: "+$("#e8").select2("val"));}); $("#e8_get").click(function () { alert("Selected value is: "+$("#e8").select2("val"));});
$("#e8_set").click(function () { $("#e8").select2("val", "CA"); }); $("#e8_set").click(function () { $("#e8").select2("val", "CA"); });
$("#e8_cl").click(function() { $("#e8").select2("val", ""); }); $("#e8_cl").click(function() { $("#e8").select2("val", ""); });
$("#e8_get2").click(function () { alert("Selected data is: "+JSON.stringify($("#e8").select2("data")));}); $("#e8_get2").click(function () { var data = $("#e8").select2("data"); delete data.element; alert("Selected data is: "+JSON.stringify(data));});
$("#e8_set2").click(function () { $("#e8").select2("data", {id: "CA", text: "California"}); }); $("#e8_set2").click(function () { $("#e8").select2("data", {id: "CA", text: "California"}); });
$("#e8_open").click(function () { $("#e8").select2("open"); }); $("#e8_open").click(function () { $("#e8").select2("open"); });
$("#e8_close").click(function () { $("#e8").select2("close"); }); $("#e8_close").click(function () { $("#e8").select2("close"); });