Click here to Skip to main content
16,015,973 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
simpledeveloper21-Sep-20 8:14
simpledeveloper21-Sep-20 8:14 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
W Balboos, GHB21-Sep-20 9:07
W Balboos, GHB21-Sep-20 9:07 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
simpledeveloper21-Sep-20 9:28
simpledeveloper21-Sep-20 9:28 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
W Balboos, GHB22-Sep-20 2:27
W Balboos, GHB22-Sep-20 2:27 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
simpledeveloper22-Sep-20 5:47
simpledeveloper22-Sep-20 5:47 
GeneralRe: Need to mask Alphanumeric values with some special characters allowed Pin
W Balboos, GHB22-Sep-20 5:53
W Balboos, GHB22-Sep-20 5:53 
GeneralPixelated in javascript Pin
Hasan Moussawi8-Sep-20 20:52
Hasan Moussawi8-Sep-20 20:52 
QuestionI have HTML and jQuery as below, I want to convert that into EmberJS Pin
simpledeveloper8-Sep-20 9:44
simpledeveloper8-Sep-20 9:44 
HTML:
<div class="tag-container" id="tag-container">
      tag1tag2tag3
    </div>
<input type="text" value="" placeholder="Add a tag" id="add-tag-input" />

jQuery:
$(document).ready(function(){
    $(function(){
      $("#add-tag-input").on({
        focusout : function() {
          var txt = this.value.replace(/[^a-z0-9\+\-\.\#]/ig,''); // allowed characters
          if(txt) $("<span/>", {text:txt.toLowerCase(), appendTo:"#tag-container", class:"dashfolio-tag"});
    
          this.value = "";
        },
        keyup : function(ev) {
          // if: comma|enter (delimit more keyCodes with | pipe)
          if(/(188|13)/.test(ev.which)) $(this).focusout(); 
        }
      });
      $('.tag-container').on('click', 'span', function() {
        if(confirm("Remove "+ $(this).text() +"?")) $(this).remove(); 
      });
    });
    });
And CSS:
.tag-container {
      max-width: 300px; /* helps wrap the tags in a specific width */
    }
    
    .dashfolio-tag {
      cursor:pointer;
      background-color: blue;
      padding: 5px 10px 5px 10px;
      display: inline-block;
      margin-top: 3px; /*incase tags go in next line, will space */
      color:#fff;
      margin-right: 4px;
      background:#789;
      padding-right: 20px; /* adds space inside the tags for the 'x' button */
    }
    
    .dashfolio-tag:hover{
      opacity:0.7;
    }
    
    .dashfolio-tag:after { 
     position:absolute;
     content:"×";
     padding:2px 2px;
     margin-left:2px;
     font-size:11px;
    }
    
    #add-tag-input {
      background:#eee;
      border:0;
      margin:6px 6px 6px 0px ; /* t r b l */
      padding:5px;
      width:auto;
    }

We are using less, instead of CSS, can you please help in converting the above code into Ember JS
SuggestionRe: I have HTML and jQuery as below, I want to convert that into EmberJS Pin
ZurdoDev9-Sep-20 10:36
professionalZurdoDev9-Sep-20 10:36 
GeneralRe: I have HTML and jQuery as below, I want to convert that into EmberJS Pin
simpledeveloper9-Sep-20 11:47
simpledeveloper9-Sep-20 11:47 
QuestionFilter the JSON object Pin
kasimmohamed5-Sep-20 5:11
kasimmohamed5-Sep-20 5:11 
QuestionHow to redirect in IE 11 Pin
huhuhhuhuh2-Sep-20 1:13
huhuhhuhuh2-Sep-20 1:13 
AnswerRe: How to redirect in IE 11 Pin
Richard Deeming2-Sep-20 2:52
mveRichard Deeming2-Sep-20 2:52 
AnswerRe: How to redirect in IE 11 Pin
huhuhhuhuh3-Sep-20 6:13
huhuhhuhuh3-Sep-20 6:13 
AnswerRe: How to redirect in IE 11 Pin
huhuhhuhuh4-Sep-20 2:33
huhuhhuhuh4-Sep-20 2:33 
AnswerRe: How to redirect in IE 11 Pin
Richard Deeming4-Sep-20 3:15
mveRichard Deeming4-Sep-20 3:15 
Questionwindow.open new window not showing up Pin
Member 1492460727-Aug-20 7:21
Member 1492460727-Aug-20 7:21 
AnswerRe: window.open new window not showing up Pin
Richard MacCutchan27-Aug-20 22:35
mveRichard MacCutchan27-Aug-20 22:35 
GeneralRe: window.open new window not showing up Pin
Member 1492460728-Aug-20 6:00
Member 1492460728-Aug-20 6:00 
GeneralRe: window.open new window not showing up Pin
Richard MacCutchan28-Aug-20 6:27
mveRichard MacCutchan28-Aug-20 6:27 
GeneralRe: window.open new window not showing up Pin
Member 1492460728-Aug-20 6:36
Member 1492460728-Aug-20 6:36 
GeneralRe: window.open new window not showing up Pin
Member 1492460728-Aug-20 11:07
Member 1492460728-Aug-20 11:07 
GeneralRe: window.open new window not showing up Pin
Richard Deeming31-Aug-20 22:32
mveRichard Deeming31-Aug-20 22:32 
QuestionTrouble communicating from brackets to chrome console Pin
Member 1492206724-Aug-20 19:00
Member 1492206724-Aug-20 19:00 
AnswerRe: Trouble communicating from brackets to chrome console Pin
F-ES Sitecore25-Aug-20 0:43
professionalF-ES Sitecore25-Aug-20 0:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.