I have a class suffix named fadecontent
in a joomla 3.0 website, and i have to loop trough all div's that have this class suffix using the $.each() function.
I tried this but it seems not to work with class suffixes. joomla docs: class suffix
$('.fadecontent').each(function(i, obj) {
with class suffix i mean this:
<div class="class classSuffix">exemple</div>
<!--example in my code-->
<div class="moduletable fadecontent">content</div>
How to archieve this?
EDIT: the script is in the <HEAD>
tag
I'm not sure I understand what you mean by class suffixes. in your example
<div class="moduletable fadecontent">content</div>
That div has both the class moduletable and fadecontent. So this should loop through all the divs with the class fadecontent
$('.fadecontent').each(function() { console.log('Do Something here'); });
If this doesn't achieve what you're looking for, can you post more of your code so we might be able to see any other errors?
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