How do I test to see if a string is contained in a url?
&mvt:global:Product_Code;
The string it pulls down is formatted as ProductCategory_productID; On pages where product category is TFC, I have special plans. (If you must know, I want to .addclass('hide this row') )
Here I tryed to pass it into some jQuery code:
&mvt:global:Product_Code;
The string it pulls down is formatted as ProductCategory_productID; On pages where product category is TFC, I have special plans. (If you must know, I want to .addclass('hide this row') )
Here I tryed to pass it into some jQuery code:
Code:
$( document ).ready(function() {
var str = $("&mvt:global:Product_Code;");
if (str.indexOf("TFC") >= 0) {
alert('Do this stuff');
}
});
Comment