Is there any way to set a href link color using the jquery css properties ?
Basically i need to style simple model http://www.ericmmartin.com/projects/simplemodal_v12/
there is containerCss options where i need to pass that style:
New in 1.2, you have the option to use external CSS or to pass in CSS attributes for the modal overlay, container, and data elements as options. The options are:
overlayCss,containerCssanddataCssand take a key/value object of properties. See the jQuery CSS Docs for details.
You can just use the CSS definition for it:
$('a').css({
color: '#ff0000'
});
Or, alternatively, using a shorter syntax:
$('a').css('color', '#ff0000');
EDIT: since you are using Simplemodal: you are only able to style the overlay, container and data wrapper elements in your modal using the syntax described on this page. If you want to style anything else, simply use CSS or create a jQuery selector based on the DOM node you want to style.
Easiest way is
$('a').css('color','red');
But I think the best way if we creates a class for them , because it's possible, that he/she need to modify other parameters too. In this case the CSS things will be in the CSS ( and the color is that) , and Jquery using only a class for them .
So :
$('a').addClass('className');
and in the CSS
.className
{
color:red;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With