Let's introduce jQuery .on
$('body').on('click', '.cs-select', function(event) {
console.log('I fired!!!');
new SelectFx(this);
});
$('.add').click(function() {
$('.container').append('<select class="cs-select cs-skin-elastic"><option value="" disabled selected>Select a Country</option><option value="france" data-class="flag-france">France</option><option value="south-africa" data-class="flag-safrica">South Africa</option></select>');
});
http://codepen.io/anon/pen/VLyMJO
But you probably want to trigger a function on the change though right?
UPDATED based on the comment discussion below with what I think is correct. Thanks @squint.
$('.add').click(function() {
var $newElement = $('<select class="cs-select cs-skin-elastic"><option value="" disabled selected>Select a Country</option><option value="france" data-class="flag-france">France</option><option value="south-africa" data-class="flag-safrica">South Africa</option></select>');
$('.container').append($newElement);
new SelectFx($newElement[0]);
});