Search Results

Search found 3 results on 1 pages for 'marilou'.

Page 1/1 | 1 

  • How can I declare an object with properties that I will be passing around inside of my function using Typescript?

    - by Marilou
    I've been using the following: var modal = { content: '', form: '', href: '' } But now I have started to use Typescript is there a better way I can declare an object and how can I declare the types of my properties. The reason I am using this object is that it's inside of a function and inside that function I have other functions that set and use the values of the properties. Is this the best way for me to do this or is there another way I could better do this with typescript?

    Read the article

  • Do I need to declare all my JQuery prototypes in a JQueryStatic definition file with typescript?

    - by Marilou
    I have the following code: ///<reference path="../typescript/jquery.d.ts" /> function addThemePrototypes() { var templateSetup = new Array(); $.fn.addTemplateSetup = function(func, prioritary) { if (prioritary) { templateSetup.unshift(func); } else { templateSetup.push(func); } }; } When I try to add the following: $('a').addTemplateSetup( Into this same file I notice there is no intellisense and typescript does not seem to know about the addTemplateSetup prototype that I just added. Is this the correct way for it to work or do I always need to add things like the definition for addTemplateSetup to an JQueryStatic definition file and then include that?

    Read the article

  • How can I remove all classes that are not named "message" from an element?

    - by Marilou
    I have the following: <div id="abc"> </div> Inside that div there can be one only of the following: <p class="message"> <p class="message error"></p> <p class="message warning"></p> <p class="message success"></p> <p class="message loading"></p> Is there a way that I can find and remove only the class from the <p> element that's NOT "message". I realize I could remove everything and then add what I need with .removeClass() but this won't work for me as after I previously added the message class I did some CSS changes and these will be lost if I remove all and then add again the message class.

    Read the article

1