Answers for "jquery change page title"

5

jquery get current url

var currentURL = $(location).attr('href'); //jQuery solution
var currentURL = window.location.href; // raw javascript
Posted by: Guest on July-23-2019
0

jquery change document title

<script type="text/javascript">

    $(document).ready(function() {
        document.title = 'blah';
    });

</script>
Posted by: Guest on July-29-2021
8

jquery change text

$(yourElement).html("New text");
//sets yourElement innerHTML to "New text"
var text = $(yourElement).html();
//html() returns the text inside yourElement if you pass no parameters
Posted by: Guest on March-14-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language