Reputation: 11
I want to add my own font style to the following JS script - how do I this?
<script>
$(function () {
$('#contact').validate({
submitHandler: function (form) {
$(form).ajaxSubmit({
url: 'process.php',
success: function () {
$('#contact').hide();
$('#contact-form').append("<p class='thanks'>Thanks! Your request has been sent.</p>")
}
});
}
});
});
</script>
Upvotes: 0
Views: 60
Reputation: 35276
Just add it straight to that tag if you're just trying to change the font of the 'thanks' class.
$('#contact-form').append("<p class='thanks' style='font-family: yourFont'>Thanks! Your request has been sent.</p>")
Upvotes: 1
Reputation: 2450
You'd better set the font in class style through css file.In your css file:
.yourFontClass{
font-family:Arial;
}
your success callback:
$('#contact-form').append("<p class='thanks yourFontClass'>Thanks! Your request has been sent.</p>")
Hope it's useful for u. : )
Upvotes: 0
Reputation: 133
You have to add stylesheet to your head section
<link href="style.css" rel="stylesheet" type="text/css">
In stylesheet
.thanks {
font-family: Arial;
}
Upvotes: 0