Jquery 动态添加伪类

Jquery 动态添加伪类,jquery,pseudo-class,Jquery,Pseudo Class,我使用jQueryAppend API构建包含超链接的以下消息 var initialMsg = jQuery('<div>').append( jQuery('<span>').text('Network connection problem. Please check your network connection. ')).append('<p>').append( jQ

我使用jQueryAppend API构建包含超链接的以下消息

var initialMsg =  jQuery('<div>').append(
                    jQuery('<span>').text('Network connection problem.  Please check your network connection. ')).append('<p>').append(
                    jQuery('<span>').text('Click ')).append(jQuery('<a>').attr('href', window.location.href).css({'cursor': 'pointer', 'color':'blue'}).text(' here')).append(jQuery('<span>').text(' to refresh page.'));

这里?

为什么不使用css设置锚样式?演示:

a:link 
a:hover 
a:link {
    cursor: pointer;
    color: Blue;
    font-size: 12pt;
}
a:hover {
    cursor: pointer;
    color: Black;
    font-size: 18pt;
}