Html contains a <p> element with text Sample
Script Contains
var aVar = 'Sample';
if ( $( "p:contains(aVar)" ) ) {
    console.log("-------start--------")
    if(true){
        console.log("from here..............")
        console.log("aVar="+aVar)
        $( "p:contains(aVar)" ).after(<p>12345</p>); //was not executed
    }
}
The output which i get is
-------start--------
from here..............
aVar=Sample
Why was not executed?
 
     
     
     
     
    