<script type="text/javascript"> $(document).ready(function() { function formatLabel(label, item) { var data = label.split(','); return '<span class="city">' + data[0] + '</span>, <span class="state">' + data[1] + '</span>'; } $('#id_city_0').djselectable('option', 'formatLabel', formatLabel); }); </script>
But I am not sure how to customize the '#id_city_0' part of the line: $('#id_city_0').djselectable('option', 'formatLabel', formatLabel);
How do I determine what "id_city_0" is for me? I am trying to use the Javascript debugger and looking into the jquery.dj.selectable.js source code.
--
You received this message because you are subscribed to the Google Groups "django-selectable" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-selecta...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
$(document).ready(function() {
function formatLabel(label, item) {
return '<a class="userorgroup-autocomplete" href="http://google.com"><span class="some_class">' + label + '</span></a>';
}
$('#id_city_0').djselectable('option', 'formatLabel', formatLabel);
});
$('.userorgroup-autocomplete').click(function(event) {
var url = $(this).attr('href');
});
Thanks!
$(document).ready(function() {
function formatLabel(label, item) {
var url = "http://yahoo.com/";
return '<a class="userorgroup-autocomp" href="' + url + '">><span class="zoo">' + label + '</span></a>';
}
$('#id_city_0').djselectable('option', 'formatLabel', formatLabel);
$('ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all').unbind("mousedown");
$('ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all').unbind("click");
});
$('ul.ui-autocomplete.ui-menu.ui-widget.ui-widget-content.ui-corner-all').click(function(event) {