Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

URL attribute from data of HTML element #39

palodelincak opened this Issue Sep 3, 2012 · 1 comment


None yet
2 participants

Is possible to make universal .ajax-chzn-select class, which will be loading URL attribute from HTML element?

Something like this:

    method: "GET"
    dataType: "json"
    url: $(this).data("url")
  , (data) ->
    terms = {}
    $.each data, (i, val) ->
      terms[val._id] = val.name + " <span class='slug'>(" + val.slug + ")</span>"

That would not make sense for most peoples needs this is to specific. If you have trouble geting the data for the url try this

    var $this = $(this);
        type: 'GET',
        url: $this.data("url")
        dataType: 'json', 
            //your callback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment