Posts

Showing posts from May, 2015

How to Highlight the active navbar link with jQuery in Twitter Bootstrap .

<script>     jQuery(document).ready(function () {         var url = window.location;         jQuery('ul.nav a[href="'+ url +'"]').parent().addClass('active');         jQuery('ul.nav a').filter(function() {              return this.href == url;         }).parent().addClass('active');     }); </script>

How to get Filezilla Quickconnect History

C:\Users\<USER_PC>\AppData\Roaming\FileZilla - Edit the file called " recentservers.xml " and edit /remove the <Server> elements you want

How to add class based on active URL in PHP and in jQuery

//Past into Header <?php $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $page_class =explode('/',$actual_link); ?> <body class="<?=end($page_class);?>"> ================= jQuery ============== <script> $(function() {   var loc = window.location.pathname; // returns the full URL var split_loc = loc.split('/'); active_loc = split_loc[split_loc.length-1]; $('body').addClass(active_loc + "-page"); }); </script>