Hello Here s a simple question, could someone tell me what is the use of the last part of this line of code ? jQuery("#city").val(panels[<?php echo $this->work->fk_panel_id;?>].city_id); Code (markup): I know it sets the value of the city dropdown box. My question is to roughly know what it is doing exactly ? It assigns a value to city but what is panels supposed to be ? an array ? what is .city_id used for at the end. You ll understand i have no jquery background , tks for your answer
Its setting the input#city with the value of the city_id from the panels object which matches the fk_panel_id. You have pretty much answered this yourself.