m...@studionoto.com
unread,May 25, 2015, 4:35:50 AM5/25/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sel...@googlegroups.com
Hi there,
I need to access to params object when event is fired.
If I fire the event from dropdown i can access to params object.
If I fire event from script with command:
$("#boxf").val("C").trigger("change")
or
$("#boxf").val("C").trigger("select2:select")
the params object is not present!
How can access to params object in this case ? is it a bug ?
thank you
Max
<body>
<select id="boxf">
</select>
<script>
var ev;
d = [
{ "id": "1", "text": "one" },
{ "id": "2", "text": "two" },
{ "id": "3", "text": "three" },
{ "id": "4", "text": "four" },
];
$f = $("#boxf").select2({ data: d });
$f.on("select2:select", function (e) {
console.log(e);
ev = e;
val = $f.val();
});
</script>
</body>