Give data attribute to row not working
-
Im trying to add an attribute to a row with a specific class using .attr but nothing happens. Tried giving it to the nav-tag and it works, but when I try to give it to a .row div it doesn't. Anyone who has a clue why? Im not very good at JS.
my code:
$(document).ready(function(){
$('.row.light').attr('data-info', '222');
}); -
Hey!
Please use "jQuery" instead of "$"
as described here:
http://laytheme.com/documentation.html#custom-javascriptAlso document ready wont work, you will need to use the event "newpageshown" as described here:
http://laytheme.com/documentation.html#newpage-events -
Hey!
Please use "jQuery" instead of "$"
as described here:
http://laytheme.com/documentation.html#custom-javascriptAlso document ready wont work, you will need to use the event "newpageshown" as described here:
http://laytheme.com/documentation.html#newpage-events@arminunruh Thanks a lot man :)
For paid 1-on-1 Lay Theme Coaching, contact Audrey (audrey@cyberslayers.work) or me (info@laytheme.com).
We also code custom websites or bespoke Lay features. Drop me a line at info@laytheme.com or check out my work at arminunruh.com.
Want to support my work? paypal.me/arminunruh
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it