當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript jquery類代碼示例

本文整理匯總了TypeScript中jquery的典型用法代碼示例。如果您正苦於以下問題:TypeScript jquery類的具體用法?TypeScript jquery怎麽用?TypeScript jquery使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了jquery類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: V

import * as joint from "../../build/joint";
import './custom';
import {V, g} from "../../build/joint";
import * as $ from "jquery";

const $body = $('body');
const svg = joint.V('svg');
const svgRect = V('rect').attr({fill: 'red', width: 80, height: 50});
const svgEllipse = V('ellipse').attr({fill: 'green', rx: 100, ry: 50, cx: 200, cy: 80, x: 20, y: 30});

svg.append(svgRect);
svg.append(svgEllipse.node);

$body.append($('<h3/>').text('Example SVG created by Vectorizer'));
$body.append(svg.node);

const graph = new joint.dia.Graph;
const paper = new joint.dia.Paper({
    el: $('#paper'),
    width: 650,
    height: 400,
    gridSize: 20,
    model: graph,
    markAvailable: true,
    defaultLink: new joint.shapes.app.Link()
});

let rect = new joint.shapes.basic.Rect()
    .position(10, 10)
    .size(100, 100)
    .addTo(graph)
開發者ID:DavidPesta,項目名稱:joint,代碼行數:31,代碼來源:index.ts

示例2: lnk

function lnk(id: string, txt?: string) {
	var a = $('<a/>', {href: '#'+id});
	a.text(txt || (helpData[_.toLower(id)] || new HelpData(id, () => [])).title);
	return a;
}
開發者ID:UnlitStudio,項目名稱:PlazaPlus,代碼行數:5,代碼來源:help.ts

示例3: close

	protected close() {
		this.element.fadeOut();
		$('body').removeClass('modal-open');
	}
開發者ID:openevocracy,項目名稱:openevocracy,代碼行數:4,代碼來源:modal.component.ts

示例4: CandleList

$(() => {
    $.ajax({
        url:'/stockdata/'+stock,
        success:(candles:Candle[])=>{

            const candleList:CandleList = new CandleList(candles);

            let sma8:any[] = candleList.getSMA(8);
            let sma21:any[] = candleList.getSMA(21);
            let sma55:any[] = candleList.getSMA(55);
            
            candles = candles.slice(-180);
            sma8 = sma8.slice(-180);
            sma21 = sma21.slice(-180);
            sma55 = sma55.slice(-180);
            
            $('body').append('<div id="chart"></div>');
            
            const chart = new Chart({
                svg:d3.select('#chart').append('svg'),
                width:1350,
                height:300,
                padding:{top:50,right:70,bottom:0,left:0},
                dateArray:candles.map(candle => candle.date),
                minValue:d3.min(candles.map(candle => candle.low)),
                maxValue:d3.max(candles.map(candle => candle.high))
            });
            
            chart.plotPivots(new CandleList(candles).getPivots().lows,'pivot-lows','blue','low');
            chart.plotPivots(new CandleList(candles).getPivots().highs,'pivot-highs','red','high');
            
            chart.plotDateAxis('date-axis');
            chart.plotValueAxis('price-axis',10);
            // chart.plotSupportLines(candles);
            chart.plotCandles(candles,'price-chart');
            chart.onMouseMove(date=>{
                console.log(date);
            });
            // chart.plotCurve(candles.map(candle => {return {
            //     date:candle.date,
            //     value:candle.low
            // }}),'price-chart','yellow');
            // chart.plotCurve(candles.map(candle => {return {
            //     date:candle.date,
            //     value:candle.high
            // }}),'price-chart','steelblue');
            // chart.plotCurve(sma8,'price-sma-8','red');
            // chart.plotCurve(sma21,'price-sma-21','blue');
            // chart.plotCurve(sma55,'price-sma-55','yellow');
            
            
            
            chart.plotCrossHair();
        },
        error:(error) => {
            console.log(error);
        }
    });
});
開發者ID:cyrilpanicker,項目名稱:stock-scope,代碼行數:59,代碼來源:main.ts

示例5: constructor

 constructor(elementRef: ElementRef) {
   this.element = $(elementRef.nativeElement);
   GROUPS.set(this.scrollGroup, GROUPS.get(this.scrollGroup) || []);
   GROUPS.get(this.scrollGroup).push(this.element);
 }
開發者ID:arpitsaan,項目名稱:ShapeShifter,代碼行數:5,代碼來源:scrollgroup.directive.ts

示例6: function

		this.element.on('click', function (e: any) {
			var target = $(e.target);
			if (!target.closest('.modal-dialog').length) {
				modal.close();
			}
		});
開發者ID:openevocracy,項目名稱:openevocracy,代碼行數:6,代碼來源:modal.component.ts

示例7: renderEl

 renderEl() {
   const scrollEl = super.renderEl()
   return $('<div class="fc-scroller-clip" />').append(scrollEl) // return value
 }
開發者ID:diomed,項目名稱:fullcalendar-scheduler,代碼行數:4,代碼來源:ClippedScroller.ts

示例8: print_log

function print_log(msg: Log) {
    const log_line = $("<div></div>").text(msg.line);
    console.log("line")
    $('#log').append(log_line);
}
開發者ID:crepi22,項目名稱:dccjs,代碼行數:5,代碼來源:logs.ts

示例9: canUndo

export function canUndo(): boolean {
    return (
        getTheOneReaderToolsModel().shouldHandleUndo() &&
        getTheOneReaderToolsModel().canUndo()
    );
}

export function undo() {
    getTheOneReaderToolsModel().undo();
}

export function applyToolboxStateToPage() {
    applyToolboxStateToUpdatedPage();
}

$(document).ready(() => {
    getTheOneToolbox().initialize();
});

// Make the one instance of each Toolbox class and register it with the master toolbox.
// The imports we need to make these calls possible also serve to ensure that each
// toolbox's code is made part of the bundle.
ToolBox.registerTool(new BookSettings());
ToolBox.registerTool(new DecodableReaderToolboxTool());
ToolBox.registerTool(new LeveledReaderToolboxTool());
ToolBox.registerTool(new MusicToolAdaptor());
ToolBox.registerTool(new ImpairmentVisualizerAdaptor());
ToolBox.registerTool(new MotionTool());
ToolBox.registerTool(new TalkingBookTool());
ToolBox.registerTool(new SignLanguageTool());
ToolBox.registerTool(new ImageDescriptionAdapter());
開發者ID:BloomBooks,項目名稱:BloomDesktop,代碼行數:31,代碼來源:toolboxBootstrap.ts

示例10:

		$('#content').slideUp(function() { $('#content').empty().append(content).slideDown(); });
開發者ID:UnlitStudio,項目名稱:PlazaPlus,代碼行數:1,代碼來源:help.ts


注:本文中的jquery類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。