-4

I want to remove attribute id="latlongclicked from input type text using jquery

<div id="divloc">
  <hr>
  <label>Address(optional)</label>
  <!--<label class=" remove  btn " >Remove</label>-->   
  <input name="addr[]" class=" form-control" type="text"  placeholder="Address"></input>

  <label>Location(required)</label>
  <input name="loc[]" class="form-control" type="text" required="true" placeholder="Location" id="latlongclicked" name="location"  readonly></input>
  <p class="description" style="font-size:10px;">Click on google map to set your location </p 
</div>
Ram
  • 143,282
  • 16
  • 168
  • 197
SMHussain
  • 31
  • 2
  • 8

1 Answers1

1

You can use the removeAttr function:

$('#latlongclicked').removeAttr('id');

http://api.jquery.com/removeattr/

Ben
  • 842
  • 1
  • 10
  • 21