On Thu, Jul 12, 2012 at 10:39 AM, bhabishyat <
bhabi...@gmail.com> wrote:
> Hi,
>
> I am using dojo for my application and have used select2 for my select
> boxes. I have built simple function as follows:
>
> function loadSelect()
> {
> $(".form-select").select2({
> placeholder: "Select Anyone"
> });
> }
>
> This function is called by dojo's dojo.behaviour.apply(). On page load, the
> select2 is working properly and the select elements are rendered using
> select2. I am using dojo to generate a form using ajax and place it in the
> dom. Once i add a new form using ajax, the select2 is not used by added
> select elements. The behaviour.apply() function is called every time a new
> form is added ( so is the loadSelect()). But i get an error as "query
> function not defined for Select2 undefined error" . Can you help me fix the
> error? I am not sure what causes the error and what i should do to fix it.
i believe this error happens because you do not attach select2 to a
select tag...so double check what tag select2 sees.
> Also is there a dojo port for select2 so that i dont have to use both dojo
> and jquery?
i dont think a port is possible, it would have to be a rewrite.
-igor
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "select2" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/select2/-/cczza3PkaLIJ.
> To post to this group, send email to
sel...@googlegroups.com.
> To unsubscribe from this group, send email to
>
select2+u...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/select2?hl=en.