♥Tsimi Posted August 24, 2015 Share Posted August 24, 2015 I can't figure out how to add simple css attibutes to a javascript .text(). The stripe payment module has the following 2 codes and I want to change their appearance. $form.find('.payment-errors').text(response.error.message); } catch ( error ) { \$form.find('.payment-errors').text(error); } so how to add styles to .text(error); or .text(response.error.message); ? Link to comment Share on other sites More sharing options...
Bob Terveuren Posted August 24, 2015 Share Posted August 24, 2015 I can't figure out how to add simple css attibutes to a javascript .text(). The stripe payment module has the following 2 codes and I want to change their appearance. $form.find('.payment-errors').text(response.error.message); Looks like that jQuery is writing in the error text 'on the fly' within a feedback loop so if you try adding a line after the above like: $form.find('.payment-errors').css('background-color', 'yellow'); or if there's specific classes assigned to the payment-errors then look at https://api.jquery.com/addclass/for swapping in/out classes Link to comment Share on other sites More sharing options...
♥Tsimi Posted August 24, 2015 Author Share Posted August 24, 2015 Thanks Bob. I am gonna read through that stuff and see if I can get it to look as I wanted to. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.