Hello there!
I have an Angular project, where i'm working with HTML, CSS and Jquery. I have a paragraph set with "display: none", and I want it to appear only when the user click a "button" tag. The thing is, the CSS is inside a @media annotation. And I can't put it inside the Paragraph tag like "style=@media all and...." as the HTML file does not compile with the annotation. It has to be inside a specific CSS document. Thanks to that, I cannot use Jquery to override the display of the Paragraph tag.
This is how it goes:
HTML:
<p id="two">
The history of ...</p>
CSS:
@media all and (max-width: 580px) {
p#two
{
display: none;
}
}
Jquery:
$(document).ready(function(){
$("p#one button").click(function(){
$("p#two").attr("style", "display: normal")
});
});
I also tried a Jquery like:
$("p#one button").click(function(){
$("p#two").css({"display" : "normal"});
});
or
$("p#one button").click(function(){
$("p#two").css({
display : 'normal'});
});
But nothing seems to override the "display: none". What can I do to fix this problem?