I am currently using...
$(function () {
var title = document.title;
var count = $('.div').length;
$(this).attr("title", title + ' (' + count + ') ' + ' - Category Page');
});
...to add a number to the page's title. Using this method only allows me to have whatever comes after the 'count' + - to have the same wording.
How would I go about changing this so that in the HTML title tag, I can have - Category Page, or whatever inline, and to just have the number inserted by jquery before the hyphen?
HTML as is now ...
<title>Bicycles</title>
What I would like ...
<title>Bicycles - Category Page</title>
Then have jquery add the div count before the hyphen.