Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove inline style for location for css classes #225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/js/jquery.storelocator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2199,8 +2199,10 @@
});

// Re-add the list background colors
$('.' + this.settings.locationList + ' ul li:even').css('background', this.settings.listColor1);
$('.' + this.settings.locationList + ' ul li:odd').css('background', this.settings.listColor2);

// UPDATED Changed inline style with custom class
$('.' + this.settings.locationList + ' ul li:even').removeClass().addClass(this.settings.listColor1);
$('.' + this.settings.locationList + ' ul li:odd').removeClass().addClass(this.settings.listColor2);
},

/**
Expand Down Expand Up @@ -2960,8 +2962,9 @@
_this.listClick(_this.map, infowindow, storeStart, page);

// Add the list li background colors - this wil be dropped in a future version in favor of CSS
$('.' + _this.settings.locationList + ' ul > li:even').css('background', _this.settings.listColor1);
$('.' + _this.settings.locationList + ' ul > li:odd').css('background', _this.settings.listColor2);
// Updated, added class instaed of inline style
$('.' + _this.settings.locationList + ' ul > li:even').removeClass().addClass(_this.settings.listColor1);
$('.' + _this.settings.locationList + ' ul > li:odd').removeClass().addClass(_this.settings.listColor2);

// Visible markers list
_this.visibleMarkersList(_this.map, markers);
Expand Down