I have a PHP code that will check for ‘open’ in the url:
$open=false;
if (isset($_GET['action'])){
if (ctype_alpha($_GET['action'])){
if ($_GET['action']=='open'){
$open=true;
}
}
}
I have also a Jquery event that will open a popup when someone click on a button:
$(document).ready(function() {
$('.open_popup_button').bind('click', function() {
//code
});
});
I would like to change the code that the popup will auto-open when the GET variable is true. Something like this:
$('.open_popup_button').bind('click <?php if($open==true){*OPEN*}', function() {
I hope you understand me.
Try this
Write
$openin a js variable form php code