jQuery plug-in development

jQuery Plug-in Development Model In the process of software development, we need certain design patterns to guide the development. With patterns, we can better organize our code, and learn a lot of good practices from the patterns summarized by the predecessors. According to the description of jQuery Advanced Programming, there are three main ...

Posted by beanfair on Tue, 16 Apr 2019 01:18:33 -0700

Tooltips Component for Bootstrap's Simple Understanding

Tooltips component I. Introduction This component uses the Tether plug-in, which is generally used to determine the location relationship between two elements, as follows: new Tether({ // This is the active attachment element element: blurEle, // This is the dependent element. target: greenEle, // Both active and passive attac ...

Posted by viperdk on Mon, 15 Apr 2019 23:27:32 -0700

Implementation of Ajax Application by Jquery

Implementation of Ajax Application by Jquery Asynchronous request of data using load() method The load() method is used to load the data from the server through an Ajax request and place the returned data into the specified element in the format of the call: load(url,[data],[callback]) The parameter url is the loading server address, th ...

Posted by engkeb0i on Mon, 15 Apr 2019 15:03:32 -0700

Loading order of js in page and execution order of multiple jquery $(document).ready()

jQuery $(document).ready() execution order: Execute. ready() when all DOM elements of the page are loaded. Document. ready() is executed after the DOM structure has been drawn, without having to wait until the loading is complete. If there is javascript code before. ready() executes, how will javascript execute? The answer is to execute the ...

Posted by daneilair on Mon, 15 Apr 2019 14:54:32 -0700

jQuery Series 3 - Animation and ajax

I. Display and Hide hide(): Hidden in an HTML document, you set the css attribute display of an element to none show(): Display. Show hidden elements. Set the display attribute of css to block or inline or other values other than none. It depends on the state before concealment. What is the state before hiding shows why it is < ...

Posted by davidosullivan on Mon, 15 Apr 2019 13:03:33 -0700

Front-end rookie code snippets

Code snippets summarized in this article (1) Most need to introduce jquery Last updated March 10, 2017 1. Enter trigger code $(function(){ $('#username').focus(); //Carriage return query document.onkeydown = function(event) { var e = event || window.event || arguments.callee.caller.arguments[0]; ...

Posted by petrb on Sun, 14 Apr 2019 23:30:34 -0700

web Timing Mechanism-performance Object

Front words Page performance has always been an area of concern for Web developers. But in practical application, the index of measuring page performance is javascript's. Date object . The Web Timing API has changed this situation, enabling developers to use the measurements within the browser through javascript, giving a lot of information a ...

Posted by siri_suresh on Sat, 13 Apr 2019 17:27:32 -0700

Deep into JavaScript -- Closures

concept Closure refers to the phenomenon that a local variable in a function can not be destroyed after it is invoked by another function. Functions are the only structure in JavaScript that has its own scope, so the creation of closures depends on functions. var Foo = function() { var name = 'staven'; this.getName = function() { ...

Posted by jscix on Sat, 13 Apr 2019 14:45:33 -0700

jQuery Source Series (XIV) Custom Events

Welcome. My column Check out a series of articles. Previously, I only knew that click events would only start when clicking on elements in browsers, as would other events, requiring human mouse operations. Later, with the continuous deepening of learning, it was known that the original JS can write functions to control the execution of events, ...

Posted by ow-phil on Sat, 13 Apr 2019 11:09:32 -0700

Why does js sometimes fail in head

1. Writing js today encounters a strange problem. Written js is executed in body, but it has no effect in head. Why does this happen? Look at the failure code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <he ...

Posted by digitalflash on Fri, 12 Apr 2019 12:30:33 -0700