I am simply attempting to get jquery to identify the first letter of a paragraph. How would I do this?
For example, I have a page with a number of paragrahs on a pa
Try:
jQuery('p').each(function(){ if(jQuery(this).text().substr(0,1).toUpperCase() == 'B'){ jQuery(this).addClass('someclass') } })
You can use PHP to clean the variable and the print it in JS:
Or just grab it with document.location and extract it.
document.location