Select box not working propperly after ajax

AlienWebguy

New Member
I have this select box:\[code\]<div id="opcionesdiv"><div id="o1">Filtrar por Ciudad<select name="ciudad" id="ciudad"> <option value="http://stackoverflow.com/questions/15870106/MEDELLIN">Medellin</option> <option value="http://stackoverflow.com/questions/15870106/MANIZALES">Manizales</option> </select> <br><input name="select_comprobar" id="select_comprobar" type="button" value="http://stackoverflow.com/questions/15870106/Comprobar"/></div></div>\[/code\]I have a function like this:\[code\]$("#select_comprobar").on('click', function(event) { tacuba = $("#ciudad option:selected").val(); if (event.originalEvent === undefined) { ca = "2"; } else { ca = "3"; } var page = "1"; dan = "g"; deb = tacuba; loadData(page, dan, deb); return false;});\[/code\]the previos code works fine loadData() make some ajax call. But I have another function like this:\[code\]$('#container .pagination li.active').live('click', function(e) { var page = $(this).attr('p'); if (ca == "3") { dan = "g"; loadData(page, dan, deb); } else { loadData(page); } return false;});\[/code\]If a make a click on the "select_comprobar" button and call the second function works only once and then Im getting this (the list appears below and I can't use it):
qOcFz.png
 
Back
Top