Usually use jquery load url https://stackoverflow.com/questions/34503683/jquery-to-open-bootstrap-v3-modal-of-remote-url Only use html5 https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML https://stackoverflow.com/questions/17636528/how-do-i-load-an-html-page-in-a-div-using-javascript <a href="url ooxxooxx" data-toggle="modal" data-target="#myModal" onclick="myModal(this)"> click me </a> <div id="part3dviewModal" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> </div> <div class="modal-body"> <p>Loading...</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <script> function myModal(o){ p = document.querySelector("#myModal .modal-body"); p.innerHTML = '<object type="text/html" data="' + o.href + '" ></object>'; } </script>

繼續閱讀

https://github.com/sjardim/processwire-simple-flickr-album http://www.webinfopedia.com/multiple-file-download-by-creating-zip-file-in-PHP.html http://stackoverflow.com/questions/1754352/download-multiple-files-as-zip-in-php ===== jquery https://github.com/biesiad/jquery-multidownload ** $('.my_download_trigger').multiDownload({ delay: 500 }); http://stackoverflow.com/questions/9047645/download-multiple-files-without-using-zip-file https://github.com/sindresorhus/multi-download

繼續閱讀

http://simonguest.com/2013/04/08/jquery-mobile-and-angularjs-working-together/ http://0not.net/index.php/using-angularjs-and-jquery-mobile/ At the bottom of body, load AngularJS and then jQM Use jQM for routing (which is the default, as long as you don’t include ngRoute)

繼續閱讀

http://stackoverflow.com/questions/16723877/jquery-file-upload-maxnumberoffiles-and-getnumberoffiles-options I believe getNumberOfFiles was only added as an option to a recent version of jquery.fileupload-ui.js (8.2.1). As an alternative, you can set the option singleFileUploads to false, and in the add callback you can throw errors if more than one file is added. var maxFiles = 1; $('#fileupload').fileupload({ singleFileUploads: false, url: '/uploadUrl' }).bind('fileuploadadd', function (e, data) { var fileCount = data.files.length; if (fileCount > maxFiles) { alert("The max number of files is "+maxFiles); return false; } });

繼續閱讀

https://github.com/blueimp/jQuery-File-Upload/issues/622 看連結最下面 Here is some updated code that works with the most recent version as of July 18, 2014. class CustomUploadHandler extends UploadHandler { /* Converts a filename into a randomized file name */ private function _generateRandomFileName($name) { $ext = pathinfo($name, PATHINFO_EXTENSION); return md5(uniqid(rand(), true)).'.'.$ext; } /* Overrides original functionality */ protected function trim_file_name($file_path, $name, $size, $type, $error, $index, $content_range) { $name = parent::trim_file_name($file_path, $name, $size, $type, $error, $index, $content_range); return $this->_generateRandomFileName($name); } } $upload_handler = new CustomUploadHandler();

繼續閱讀

datatable row_id

基本上官方的fnGetData和fnGetPosition之類,fnGetPosition拿到是抓出幾筆中第幾筆id和真正的Row_ID不一樣。用fnGetData一直拿到Object,根本解不開,試了官方和網路上的方式,全都不行。 fnrender被拿掉了…..無法判斷Object 最快方式:直接用jquery $('#datatable tbody').on( ‘click’, ‘tr’, function () { 這行會取得tr 底下直接用 row_id = $(this).attr(‘id’).split("_")[1]; $(this).attr(‘id’)會找到tr用的id,得到值:ROW_22 split("_")之後:ROW 22,取[1],就行得到id。

繼續閱讀

確實搞錯使用方式 正確來說,用id時,如果要多個相同,可能只會綁定第一個 所以最好用 class或是html元素(p href…)之類才能綁住 另外綁住之後,取值要記得用$(this),這樣才會取到 執行綁定的元件 重要:live新版停用,請用on ….這是試了很久才發現,為什麼javascriprt一直錯,才發現沒live這function,才知道新版刪除function,請用on 或bind ========================= element.click 如果有新增或變更element會失敗 $("#pic_del").click bind比較沒什麼問題,但也有可能 $("#pic_del").bind(‘click’, function() { http://stackoverflow.com/questions/7268580/bind-click-and-live-click live是最好,但不能直接 #pic_del是a href,所以 $("#pic_del").live(‘click’, function() { 會失敗 按連結說明,要找到對應的selector再指定 也許 $("#xxx a").live(‘click’, function() { 但實際上…用bind比較快,live會失效…..也許是我搞錯或用錯方式 DOM traversal methods are not supported for finding elements to send to .live(). Rather, the .live() method should always be called directly after a selector

繼續閱讀

作者的圖片

Sue boy

Sueboy Can support You

CIO

Taiwan