diff --git a/plugins/CoreAdminHome/templates/jsTrackingGenerator.js b/plugins/CoreAdminHome/templates/jsTrackingGenerator.js
index d94a0373569..d1ecd3705f2 100644
--- a/plugins/CoreAdminHome/templates/jsTrackingGenerator.js
+++ b/plugins/CoreAdminHome/templates/jsTrackingGenerator.js
@@ -132,7 +132,7 @@
var goals = allGoals[idsite] || [];
for (var key in goals) {
var goal = goals[key];
- selectElement.append($('').attr('value', goal.idgoal).text(goal.name));
+ selectElement.append($('').val(goal.idgoal).text(goal.name));
}
// set currency string
diff --git a/plugins/Dashboard/templates/dashboard.js b/plugins/Dashboard/templates/dashboard.js
index 96ea45c28d3..8bd8ddd6c73 100644
--- a/plugins/Dashboard/templates/dashboard.js
+++ b/plugins/Dashboard/templates/dashboard.js
@@ -80,9 +80,9 @@ function initDashboard(dashboardId, dashboardLayout) {
}
function createDashboard() {
- $('#createDashboardName').attr('value', '');
+ $('#createDashboardName').val('');
piwikHelper.modalConfirm('#createDashboardConfirm', {yes: function () {
- var dashboardName = $('#createDashboardName').attr('value');
+ var dashboardName = $('#createDashboardName').val();
var type = ($('#dashboard_type_empty:checked').length > 0) ? 'empty' : 'default';
var ajaxRequest = new ajaxHelper();
@@ -109,8 +109,8 @@ function resetDashboard() {
}
function renameDashboard() {
- $('#newDashboardName').attr('value', $('#dashboardWidgetsArea').dashboard('getDashboardName'));
- piwikHelper.modalConfirm('#renameDashboardConfirm', {yes: function () { $('#dashboardWidgetsArea').dashboard('setDashboardName', $('#newDashboardName').attr('value')); }});
+ $('#newDashboardName').val($('#dashboardWidgetsArea').dashboard('getDashboardName'));
+ piwikHelper.modalConfirm('#renameDashboardConfirm', {yes: function () { $('#dashboardWidgetsArea').dashboard('setDashboardName', $('#newDashboardName').val()); }});
}
function removeDashboard() {
@@ -140,7 +140,7 @@ function setAsDefaultWidgets() {
}
function copyDashboardToUser() {
- $('#copyDashboardName').attr('value', $('#dashboardWidgetsArea').dashboard('getDashboardName'));
+ $('#copyDashboardName').val($('#dashboardWidgetsArea').dashboard('getDashboardName'));
var ajaxRequest = new ajaxHelper();
ajaxRequest.addParams({
module: 'API',
@@ -166,8 +166,8 @@ function copyDashboardToUser() {
piwikHelper.modalConfirm('#copyDashboardToUserConfirm', {
yes: function () {
- var copyDashboardName = $('#copyDashboardName').attr('value');
- var copyDashboardUser = $('#copyDashboardUser').attr('value');
+ var copyDashboardName = $('#copyDashboardName').val();
+ var copyDashboardUser = $('#copyDashboardUser').val();
var ajaxRequest = new ajaxHelper();
ajaxRequest.addParams({
diff --git a/plugins/UserCountryMap/js/visitor-map.js b/plugins/UserCountryMap/js/visitor-map.js
index 66473a465f7..0cd41f01643 100644
--- a/plugins/UserCountryMap/js/visitor-map.js
+++ b/plugins/UserCountryMap/js/visitor-map.js
@@ -1077,7 +1077,7 @@
country.fips = UserCountryMap.differentFIPS[country.iso2];
}
$.each(metrics, function (i, metric) {
- metric = $(metric).attr('value');
+ metric = $(metric).val();
country[metric] = data[metric];
});
countryData.push(country);