None
None

Reputation: 9247

How to add icon in input field with jquery?

I have input submit button and i want to add icon so that i get SEND >

<i class="fa fa-arrow-right"></i>

<input type="submit" value="SEND" class="wpcf7-form-control wpcf7-submit">

Upvotes: 0

Views: 5905

Answers (2)

Jai
Jai

Reputation: 74738

As per your latest comment you can go through the docs of your wp-form plugin:

<div class="column-full">
     <label>[submit "SEND"]<i class='fa fa-arrow-right'></i></label>
</div> 

Just add the class to the input[type='submit']:

<input type="submit" value="SEND" class="wpcf7-form-control wpcf7-submit fa fa-arrow-right">  

With jQuery:

$('.wpcf7-form-control.wpcf7-submit').addClass('fa fa-arrow-right');

Upvotes: 2

Anto S
Anto S

Reputation: 2449

You can use below:

$(document).ready(function(){
   $('input[type="submit"]').addClass('fa fa-arrow-right'); // What ever class you required you can add here
})

Upvotes: 0

Related Questions