javascript - datatables element in row triggers selected/deselect -


i'm using jquery datatables plugin select extension , need use <select> list in 1 of fields (inside each row). <option> gets id selected row.

the problem each time click list element, row select atrribute triggered. ok if user doesn't select row , clicks list, if row selected when user clicks list element, row deselected, causing id empty.

i thinking in disable <select> list , enabling when row selected, preventing <select> element triggering select attribute (this last part lost, done dt option, jquery. tried, foolishly, css option z-index realized has nothing do... ).

what have in mind (so far...):

$('.select_class').on('click', function() {     $(this).parent().parent().preventaddclass('.selected'); }); 

how this?

the <select> list part of data comes ajax source:

[{"id":76,/* other fields*/"the_select":"<select class=\"select_class\"><option value=\"add\">1234 \u20ac<\/option><option value=\"remove\" >hide<\/option><\/select>"}] 


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -