Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#recency-link').click(function(){
- $("#segment-rules .rules-wrap").append("<div id='recency-rule' class='rule-block'><div class='rule-head'><select><option>Recency</option><option>Recency</option></select></div><div class='rule-detail'><select><option>Last Day</option><option>Last week</option><option>Last 14 days</option><option>Last month</option><option value='lastNHs'>Last <em>n</em> horas</option></select></div><div class='cross'></div></div>");
- $('#segment-rules select').selectric();
- $('#recency-rule .cross').click(function(){
- $(this).parents('.rule-block').remove();
- $('#recency-link').show();
- });
- $('.rule-detail select').on('change', function() {
- if ($(this).val() == 'lastNHs') {
- $(this).parent().parent().addClass('lastNHs')
- $("#recency-rule .rule-detail").append("<div class='recency_hs'><input></input></div>");
- }
- $(".recency_hs").remove();
- });
- return false;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement