woocommerce customising checkout fields

I have read the documentation over at woocommerce on how to customise checkout fields:

http://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/

Read More

I have the following which works fine:

$fields['order']['billing_last_name']['label_class'] = array('info');
 return $fields;

This adds a new class to the label on the billing_last_name field.

I would like to add a on:hover event to the above, so when you hover on the class “info” it changes to say “showinfo”. The idea behind this is that i would like to create a tooltip.

i Have added the following jQuery to do this:

$(document).ready(function () {
$(".info").hover(
function () {
$(".info").toggleClass('showinfo');
}});

I have also enqueued jQuery. For some reason it will not change the class.

Any ideas on what could be wrong?

Related posts

Leave a Reply

1 comment

  1. I managed to solve this by changing my jquery:

    jQuery(document).ready(function () {
    jQuery(".info").hover(
    function () {
    jQuery(".info").toggleClass('showinfo');
    }})