Identify which document belongs Js Css element

0

Pleased to meet you, I am working on a platform which has an element (select option) bootstrap that "inspect" shows me the item you want to change but I'm not sure that this document is.

When I look at the source, I only see the css and styles on the right but in the element shown it shows me what I want but not the place where I can find and edit it

    
asked by claus 17.07.2018 в 16:37
source

1 answer

0

In this case you must add some jquery and javascript code: in your hmtl of that page.

Assuming this is my selection to which I will add the new option:

<select name="datatable-buttons_length" class="form-control input-sm">
  <option value="10">10</option>
  <option value="20">20</option>
  <option value="30">30</option>
</select>

my javascript and jquery code:

<script>
//nueva opcion para ser agregada
var option_new = $('<option value="1000">1000</option>');
//agregando option_new
$('select[name=datatable-buttons_length').append(option_new);
</script>

in your case the select does not have id, for which I did it x the name, you can do it x id, name, class css..etc ..:

Verifiable Example

I hope it serves you ..suerte

    
answered by 17.07.2018 / 17:57
source