EKLEDİĞİM KOD
<script></script>
<script>// var jQueryCalis = $.noConflict(true);
(function($) {
$(window).load(function(){
var cogalt_fonk = (function(){
var cogaltsayi = 0;
var sablon = $('#anasablon').text();
return function(){
return sablon.replace(/{{ID}}/g, ++cogaltsayi);
}
})();
var araclar = $('#araclar')
$(document).on("click", 'button.cogalt', function(){
araclar.append(cogalt_fonk());
});
$(document).on('click', 'button.sil', function() {
$(this).parent().remove();
return false;
});
araclar.append(cogalt_fonk());
});//]]>
})(jQueryCalis);
</script>
TEMANIN ORJINAL KODU
// Generated by CoffeeScript 1.4.0
(function() {
var $;
$ = window.jQuery || window.Zepto || window.$;
$.fn.fancySelect = function(opts) {
var isiOS, settings;
if (opts == null) {
opts = {};
}
settings = $.extend({
forceiOS: false,
includeBlank: false,
optionTemplate: function(optionEl) {
return optionEl.text();
},
triggerTemplate: function(optionEl) {
return optionEl.text();
}
}, opts);
isiOS = !!navigator.userAgent.match(/iP(hone|od|ad)/i);
return this.each(function() {
var copyOptionsToList, disabled, options, sel, trigger, updateTriggerText, wrapper;
sel = $(this);
if (sel.hasClass('fancified') || sel[0].tagName !== 'SELECT') {
return;
}
sel.addClass('fancified');
sel.css({
width: 1,
height: 1,
display: 'block',
position: 'absolute',
top: 0,
left: 0,
opacity: 0
});
sel.wrap('