標籤

ASP.NET MVC (29) Visual C# (15) JQuery (10) Plugins (8) JQuery Plugins (6) JavaScript (6) MySQL (5) CSS (4) LinQ (4) Mac OS (4) CentOS (3) Design Pattern (3) Entity Framework (3) IIS (3) Python (3) Windows (3) php (3) Docker (2) LAMP (2) SQL Server (2) WCF (2) .NET (1) .NET Core (1) AWS (1) Browser (1) GIS (1) IE (1) Internet Security (1) Linux (1) Platform (1) React (1) SEO (1) Testing (1) VMware (1) Windows 7 (1) cookie (1) curl (1) laravel (1) phpBB (1) session (1) 中古屋 (1) 透天 (1) 閒言閒語 (1) 面試 (1) 鳥松 (1)
顯示具有 JQuery Plugins 標籤的文章。 顯示所有文章
顯示具有 JQuery Plugins 標籤的文章。 顯示所有文章

2011年10月10日 星期一

[JQuery UI] 拖拉放 Drag and Drop

有個很棒的經驗分享:

2011年5月4日 星期三

[JQuery Plugins] JQuery UI Dialog 中顯示換行 (
)

new line in JQUERY Dialog ( <br /> )
====
一般使用JQuery UI Dialog時設定文字會使用:
$("#dialog").text( "XXX" +"< br / >" + "開始:");


但是這樣<br />會變成HTML編碼,所以要使用:
$("#dialog").html( "XXX" + "< br / >" + "開始:");

很基礎的觀念~注意上面的< br / >為了顯示正常而多個空白,正確要使用<br />

[JavaScript] 將兩個由JQuery UI DateTimePicker產生的日期時間作判斷大小

Compare two DateTime from JQuery UI DateTimePicker using JavaScript.
====================================
程式碼如下:
//檢查時間有無符合後大於前-
    //日期格視為格式yyyy/MM/dd HH:mm
    function CheckTime() {
        string_1 = $('#StartDateTime').val();
        string_2 = $('#EndDateTime').val();
        DateTime1 = string_1.split(" "); //區分yyyy/MM/dd 與 HH:mm
        DateTime2 = string_2.split(" ");
        Date1 = DateTime1[0].split("/"); //區分yyyy ; MM ; dd
        Date2 = DateTime2[0].split("/");
        Time1 = DateTime1[1].split(":");   //區分HH ; mm
        Time2 = DateTime2[1].split(":");   //區分HH ; mm

        var TrueDate1 = new Date(Date1[0], (parseInt(Date1[1]) - 1).toString(), Date1[2], Time1[0], Time1[1], 0, 0);
        var TrueDate2 = new Date(Date2[0], (parseInt(Date2[1]) - 1).toString(), Date2[2], Time2[0], Time2[1],0,0);
        if (TrueDate1 <= TrueDate2) {
            return true;
        }
        return false;
    }


當然一定有更好的寫法,趕時間就先這樣用了~

Reference:
http://www.w3schools.com/js/js_obj_date.asp
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date


Javascript Date() constructor doesn't work.

2011年4月27日 星期三

[JQuery Plugins] 使用JQuery UI datepicker作為行事曆 (Event Calendar)

有幾篇文章不錯,可以看看人家怎麼實作:

The beforeShowDay callback allows you to do this. It is a function that takes a Date as a parameter and returns an array with [0] being true if the date is selectable, false if not, [1] being a CSS class to apply to that date cell, [2] being an optional popup tooltip for the date.

$('#mydate').datepicker({beforeShowDay:
 highlightOdds});

function highlightOdds(date) {
     
 return [true, date.getDate() % 2 == 1 ? 'odd' : ''];
}




jQuery UI Datepicker with jQuery tipsy





[JqueryUI] Date Picker - color cell day


JQuery UI 官方連結



[TinyMCE] JQuery UI dialog 相衝問題

如果把TinyMCE放到dialog ,非IE就會變成唯讀,目前還沒找到適當的解決方式,

$("#dialogCommentMessage").dialog({
            autoOpen: false,
            show: "blind",
            hide: "explode",
            height: "400",
            width: "800", 
            modal: true,
              open: function (event, ui) {
                  tinyMCE.execCommand('mceAddControl', true, 'NContent');
              },
              close: function (event, ui) {
                  tinyMCE.execCommand('mceRemoveControl', true, 'NContent');
              }

        });



相關文章

http://www.flyingjolly.com/2010/10/tinymce-and-jquery-dialog/

http://stackoverflow.com/questions/2082599/tinymce-only-readable-in-jquery-ui-dialog

http://forum.jquery.com/topic/tinymce-dialog-issue

http://forgottencode.wordpress.com/2009/07/22/jquery-dialog-and-tinymce-not-working/

http://stackoverflow.com/questions/752313/tinymce-and-jquery-ui-dialog-working-nicely

http://tinymce.moxiecode.com/tryit/jquery_plugin.php