I have a URL dynamically displayed with a PHP script. This URL comes to be the name of a CSS class. I need to use this class name into a jQuery script after an Ajax call response (All the HTML into this specific class has to be hidden).
The URL contains /
and .
and :
— To make it easier in my jQuery script, I would like to convert the URL into an Integer with a PHP function (like hash("md5",)
) ... and in my JavaScript, convert the URL again into an integer that will be obviously the same.
I read that How to calculate md5 hash of a file using javascript but it doesn't look like the best solution. Does anyone have a more intelligent solution?
Regards