Thursday, 15 July 2010

javascript - next line for a html code on jquery -



javascript - next line for a html code on jquery -

this question has reply here:

can have multiple lines in <option> element? 5 answers

i have here jquery (coffeescript)

if value.kind != 'quasi-judicial' if value.court_agency !in court_agency_with_branch if value.court_agency != 'department of justice' @court_agency = "<option value=\"" + value.id + "\"> branch "+ value.branch_division + ", " + value.court_agency + ", " + @city_or_municipality + ", " + value.province + "</option>" else @court_agency = "<option value=\"" + value.id + "\">" + value.court_agency + ", " + @city_or_municipality + ", " + value.province + "</option>" else @court_agency = "<option value=\"" + value.id + "\"> partition "+ value.branch_division + ", " + value.court_agency + "</option>" else @court_agency = "<option value=\"" + value.id + "\">" + value.department + ", " + value.govt_agency + ", " + @city_or_municipality + ", " + value.province + "</option>"

on part

"<option value=\"" + value.id + "\">" + value.department + ", " + value.govt_agency + ", " + @city_or_municipality + ", " + value.province + "</option>"

i want set code \n

"<option value=\"" + value.id + "\">" + value.department + ", " + "\n" + value.govt_agency + ", " + @city_or_municipality + ", " + value.province + "</option>"

but nil happens.

the value looks like:

department of blah blah, city of thing, province of stuff

what possible code can utilize create output this:

department of blah blah, city of thing, province of stuff

take @ can have multiple lines in <option> element?. (what you're looking br tag in alternative tag)

javascript jquery coffeescript

No comments:

Post a Comment