add class to the specified element

后端 未结 2 1214
深忆病人
深忆病人 2021-01-26 22:47

Ok, i have this code

//start our session
session_start();
//check if there is a page request
if (isset($_GET[\'page\']))
{
//if there is a request page then get          


        
相关标签:
2条回答
  • 2021-01-26 23:22
     $('a[page='+$page+']').addClass('active');
    

    jsfiddle

    0 讨论(0)
  • 2021-01-26 23:32

    Like so:

    $("a[page="+$page+"]").addClass("active");
    
    0 讨论(0)
提交回复
热议问题