Category: JQUERY

Javascript Articles, Errors and Fixes

JAVASCRIPT – .prop() vs .attr()

.attr() Get the value of an attribute for the first element in the set of matched elements. .prop() Get the value of a property for the first element in the set of matched elements. What is Attributes? Attributes carry additional information about an HTML element and come in name=”value” pairs. we can set an attribute […]

jQuery Articles, Errors and Fixes

[ Solved-10 Answers ] CSS – Selecting and manipulating CSS pseudo-elements such as ::before and ::after using jQuery

PROBLEM : Is there any way to select/manipulate CSS pseudo-elements such as ::before and ::after (and the old version with one semi-colon) using jQuery? For example, the stylesheet has the following rule: How to change ‘foo’ to ‘bar’ using jQuery? SOLUTION 1: You could also pass the content to the pseudo element with a data […]