Решение: if(typeof jQuery == ‘undefined’){ // действия при НЕ ЗАГРУЖЕННОМ jQuery }
Как сравнивать даты в JS
Решение: var dt1 = new Date(dt); var dt2 = new Date(); if (dt2.getTime() >= dt1.getTime()) { args.IsValid = false; }
Как сделать postback в js
Решение: $(“#btninseturl”).click(function () { __doPostBack(‘btninseturl’, ‘OnClick’); }); Тема на форуме – http://forums.asp.net/t/1896869.aspx/1
Как сделать image uploader для cleditor
Решение: смотрим проект Промо, компонент Templates используем надстройку плагина <script src=”/scripts/cleditor/jquery.cleditor.min.js” type=”text/javascript”></script> <script src=”/scripts/cleditor/jquery.cleditor.extimage.js” type=”text/javascript”></script> <script type=”text/javascript”> $.cleditor.buttons.image.uploadUrl = ‘/your/custom/upload/path’; </script> и делаем хэндлер, который принимает HttpPostedFile file = context.Request.Files[0]; […]
Как правильно передавать параметры в Ajax, чтобы корректно обрабатывались кавычки и апострофы
Решение: var param = JSON.stringify({ ‘Titre’: Titre, ‘Description’: Description });
Как подружить jQuery Autocomplete и ASP.NET
Решение: Using aspx: In my page I have a text box: <input id=”txtSearch” type=”text” /> I am using jQuery autocomplete, set up per their example: <link […]
Как отключить в браузере контекстное меню
Решение: у тега body – oncontextmenu=”return false;”
Как избежать конфликта jQuery
Решение: jQuery.noConflict(); (function($) { $(function() { // more code using $ as alias to jQuery }); })(jQuery); // other code using $ as an alias to the other library
Как декодировать строку запроса
Решение: jQuery.noConflict(); (function($) { $(function() { // more code using $ as alias to jQuery }); })(jQuery); // other code using $ as an alias to the other library
Использование Prototype
Решение: var Calculator = function (eq) { this.eqCtl = document.getElementById(eq); }; // using JSON Calculator.prototype = { add: function (x, y) { var val = x + y; this.eqCtl.innerHTML = […]