Reputation:
I currently have this code that will replace specific cases user input with other characters and it works in browser. However, when I try to do this in a google chrome extension, the text does not get replaced. Is there a way to make it work for chrome extensions?
$('body').on('input', 'input[name=address1]', function() {
$(this).val($(this).val().replace('/', ' m. '));
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="text" class="text" name="address1" id="address1" value=""/>
Upvotes: 1
Views: 529
Reputation:
I downloaded the jquery js file and in my html file just called <script type="text/javascript" src="jquery.js"></script>
.
Upvotes: 1