I’m trying to use AJAX (not jQuery)….
I basically have this going on.
Content A Title
Content A Full
HR
Content B Teaser
Content C Teaser
Content D Teaser
I have the before and after CSS, but I’m having trouble finding example code that actually alters CSS. Instead, I’m finding tricks like ‘adding a class’ and stuff that people use to simply hack the CSS. So, I think maybe I’m starting in the wrong place.
I’m using Php 5 and MySQL, if you want to be really helpful. I’m not worried about that, though, as I’m presently working on it, myself. What I’m SUPER interested in is figuring out how to create this, without having the page refresh:
Content C Title
Content C Full
HR
Content A Teaser
Content B Teaser
Content D Teaser
You can use
[element.setAttribute][1]("*style*", "*value*"). You can target the CSS[document.querySelector][2]("*target*")to select the div class or id or what-have-you.You can use jQuery, like so:
$('*target*').css('*style*', '*value*').There doesn’t seem to be a short-hand AJAX equivalent.
Sample arguments: