[Solved] add css class using jQuery for input type text - problem Formbuilder

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

[Solved] add css class using jQuery for input type text - problem Formbuilder

Post by maranc »

Hi all, I'm tried add css class for input type=text using jquery.
My code:

{literal}

$(document).ready(function() {  
   $('input[type="text"]').addClass("blablabla");
});

{/literal}


Unfortunelly, I dont know why using this script I can't add any class for input fields in Formbuilder.
This code great works with example FrontEndUser forms? All input[type="text] have added class "blablabla".

Thanks for your help.
Marek A.

PS> This problem is when I load any form in modal window, pop-up window, using some javascript.
If form is in page code my script works fine, sorry that I didn't checked it erlier. But now is problem, how do this in modal window?
Last edited by maranc on Sat Sep 25, 2010 10:16 pm, edited 1 time in total.
Peciura

Re: add css class using jQuery for input type text - problem Formbuilder

Post by Peciura »

Make sure jQuery library is included on pop-up window. That depends on templates you are using.
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: add css class using jQuery for input type text - problem Formbuilder

Post by maranc »

I tried add jQuery in form temaple, in hidden div, where is my form - nothing change, I still can't add class trought this fragment of scrip.

Marek A.
Peciura

Re: add css class using jQuery for input type text - problem Formbuilder

Post by Peciura »

This problem is when I load any form in modal window, pop-up window, using some javascript
Have you tried to include jQuery in ?. Do you have a link to your form ?
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: add css class using jQuery for input type text - problem Formbuilder

Post by maranc »

Yes, I have still call jquery in head section... but I found issue, problem was with gallery module, exactly with lightbox template, witch I use for display images of products. When I changed template for lytebox, slimbox etc. my window modal worked fine. I removed from template [in gallery] call jQuery [there wasn't error call twice, one in head, second in lightbox template]. It's looks like problem with library prototype.js, scriptaculous.js or lightbox.js? I'm not expert in javascript but btw i tested few others java script, example: http://dev.iceburg.net/jquery/jqModal/. This script didn't work on the same page when is called lightbox librarys. I dont know why, but when I removed lightbox this script works fine. I use jQuery 1.4.0 [head section]. On this moment my problem is solved. Yhanks Peciura for your responding and your attention.

Best regards,
Marek A.
Post Reply

Return to “Layout and Design (CSS & HTML)”