1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < title > jQuery Aim by Cihadturhan</ title >
7+ < meta name ="description " content ="jQuery plugin which guesses which element user is going to be hovered/clicked. ">
8+ < meta name ="author " content ="cihadturhan ">
9+ < meta name ="robots " content ="index, follow ">
10+ <!-- Canonical URL -->
11+ < link rel ="canonical " href ="https://codehimblog.github.io/jquery-plugins/jquery-aim-by-cihadturhan.html ">
12+ <!-- Favicon -->
13+ < link rel ="icon " href ="/favicon.ico " type ="image/png ">
14+ <!-- Bootstrap CSS -->
15+ < link href ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css " rel ="stylesheet ">
16+ <!-- Bootstrap Icons -->
17+ < link href ="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css " rel ="stylesheet ">
18+ < link rel ="stylesheet " href ="/css/styles.css ">
19+ </ head >
20+ < body >
21+ <!-- Navbar -->
22+ < nav class ="navbar navbar-expand-lg navbar-dark bg-dark fixed-top ">
23+ < div class ="container ">
24+ < a class ="navbar-brand " href ="https://codehimblog.github.io ">
25+ < i class ="bi bi-box-seam me-2 "> </ i > CodehimBlog
26+ </ a >
27+ < button class ="navbar-toggler " type ="button " data-bs-toggle ="collapse " data-bs-target ="#navbarNav " aria-controls ="navbarNav " aria-expanded ="false " aria-label ="Toggle navigation ">
28+ < span class ="navbar-toggler-icon "> </ span >
29+ </ button >
30+ < div class ="collapse navbar-collapse " id ="navbarNav ">
31+ < ul class ="navbar-nav ms-auto ">
32+ < li class ="nav-item ">
33+ < a class ="nav-link " href ="https://codehimblog.github.io/ "> < i class ="bi bi-house-door me-1 "> </ i > Home</ a >
34+ </ li >
35+ < li class ="nav-item ">
36+ < a class ="nav-link " href ="https://codehimblog.github.io/projects/ "> < i class ="bi bi-box me-1 "> </ i > Projects</ a >
37+ </ li >
38+ < li class ="nav-item ">
39+ < a class ="nav-link " href ="https://codehimblog.github.io/about.html "> < i class ="bi bi-book me-1 "> </ i > About</ a >
40+ </ li >
41+ < li class ="nav-item ">
42+ < a class ="nav-link " href ="https://codehimblog.github.io/contact.html "> < i class ="bi bi-envelope me-1 "> </ i > Contact</ a >
43+ </ li >
44+ </ ul >
45+ </ div >
46+ </ div >
47+ </ nav >
48+
49+ <!-- Breadcrumbs -->
50+ < div class ="container mt-4 breadcrumbs ">
51+ < nav aria-label ="breadcrumb ">
52+ < ol class ="breadcrumb mb-0 ">
53+ < li class ="breadcrumb-item "> < a href ="https://codehimblog.github.io/ "> Home</ a > </ li >
54+ < li class ="breadcrumb-item "> < a href ="https://codehimblog.github.io/jquery-plugins/ "> jQuery Plugins</ a > </ li >
55+ < li class ="breadcrumb-item active " aria-current ="page "> jQuery Aim</ li >
56+ </ ol >
57+ </ nav >
58+ </ div >
59+
60+ <!-- Schema Markup for Breadcrumbs -->
61+ < script type ="application/ld+json ">
62+ {
63+ "@context" : "https://schema.org" ,
64+ "@type" : "BreadcrumbList" ,
65+ "itemListElement" : [
66+ {
67+ "@type" : "ListItem" ,
68+ "position" : 1 ,
69+ "name" : "Home" ,
70+ "item" : "https://codehimblog.github.io/"
71+ } ,
72+ {
73+ "@type" : "ListItem" ,
74+ "position" : 2 ,
75+ "name" : "jQuery Plugins" ,
76+ "item" : "https://codehimblog.github.io/jquery-plugins/"
77+ } ,
78+ {
79+ "@type" : "ListItem" ,
80+ "position" : 3 ,
81+ "name" : "jQuery Aim" ,
82+ "item" : "https://codehimblog.github.io/projects/{{packageSlug}}"
83+ }
84+ ]
85+ }
86+ </ script >
87+ <!-- Main Content -->
88+ < div class ="container mt-3 ">
89+ < div class ="row ">
90+ <!-- Main Details -->
91+ < main class ="col-md-8 site-main p-0 ">
92+ < article >
93+ <!-- Project Name & Description -->
94+ < h1 id ="packageName "> jQuery Aim</ h1 >
95+ < p id ="packageDescription " class ="text-muted "> jQuery plugin which guesses which element user is going to be hovered/clicked.</ p >
96+
97+
98+
99+ <!-- Statistics -->
100+ < div class ="stat-row d-flex justify-content-around align-items-center text-center mb-2 ">
101+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
102+ < i class ="bi bi-star-fill text-warning mb-2 "> </ i >
103+ < div >
104+ < span id ="stargazersCount " class ="stat-value "> 768</ span >
105+ < p class ="stat-label mb-0 "> Stars</ p >
106+ </ div >
107+ </ div >
108+
109+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
110+ < i class ="bi bi-box-arrow-in-down mb-2 "> </ i >
111+ < div >
112+ < span id ="repoSize " class ="stat-value "> 1.65 MB</ span >
113+ < p class ="stat-label mb-0 "> Size</ p >
114+ </ div >
115+ </ div >
116+
117+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
118+ < i class ="bi bi-arrow-repeat text-secondary mb-2 "> </ i >
119+ < div >
120+ < span id ="forksCount " class ="stat-value "> 37</ span >
121+ < p class ="stat-label mb-0 "> Forks</ p >
122+ </ div >
123+ </ div >
124+
125+ < div class ="stat-box d-flex align-items-center flex-column-mobile ">
126+ < i class ="bi bi-exclamation-circle text-danger mb-2 "> </ i >
127+ < div >
128+ < span id ="openIssuesCount " class ="stat-value "> 4</ span >
129+ < p class ="stat-label mb-0 "> Open Issues</ p >
130+ </ div >
131+ </ div >
132+ </ div >
133+
134+
135+ < div class ="ad-unit ad-apt ">
136+ < script async src ="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7089100907045419 "
137+ crossorigin ="anonymous "> </ script >
138+ <!-- CodehimBlog APT -->
139+ < ins class ="adsbygoogle "
140+ style ="display:block "
141+ data-ad-client ="ca-pub-7089100907045419 "
142+ data-ad-slot ="4990741913 "
143+ data-ad-format ="auto "
144+ data-full-width-responsive ="true "> </ ins >
145+ < script >
146+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
147+ </ script >
148+ </ div >
149+
150+ < div class ="row mb-4 ">
151+ <!-- Tabs (Left) -->
152+ < div class ="col-12 col-md-6 d-flex justify-content-start mb-3 mb-md-0 ">
153+ < ul class ="nav nav-tabs " id ="infoTabs " role ="tablist ">
154+ < li class ="nav-item " role ="presentation ">
155+ < button class ="nav-link active " id ="installation-tab " data-bs-toggle ="tab " data-bs-target ="#installation " type ="button " role ="tab " aria-controls ="installation " aria-selected ="true ">
156+ < i class ="bi bi-file-earmark-text "> </ i > Readme
157+ </ button >
158+ </ li >
159+ < li class ="nav-item " role ="presentation ">
160+ < button class ="nav-link " id ="changelog-tab " data-bs-toggle ="tab " data-bs-target ="#changelog " type ="button " role ="tab " aria-controls ="changelog " aria-selected ="false ">
161+ < i class ="bi bi-journal-text me-2 "> </ i > Changelog
162+ </ button >
163+ </ li >
164+ </ ul >
165+ </ div >
166+
167+ <!-- Action Buttons (Right) -->
168+ < div class ="col-12 col-md-6 d-flex align-items-center justify-content-end ">
169+ < a href ="https://github.com/cihadturhan/jquery-aim/archive/refs/heads/master.zip " class ="btn btn-primary me-2 action-btn " id ="downloadBtn ">
170+ < i class ="bi bi-cloud-download me-2 "> </ i > Download ZIP
171+ </ a >
172+ < a href ="https://github.com/cihadturhan/jquery-aim " target ="_blank " class ="btn btn-outline-secondary action-btn " id ="githubBtn ">
173+ < i class ="bi bi-github me-2 "> </ i > Fork on GitHub
174+ </ a >
175+ </ div >
176+ </ div >
177+ < div class ="tab-content mt-3 " id ="infoTabsContent ">
178+ < div class ="tab-pane fade show active " id ="installation " role ="tabpanel " aria-labelledby ="installation-tab ">
179+ < h1 > jquery.aim</ h1 >
180+ < p > jQuery plugin anticipates on which element user is going to hover/click.</ p >
181+ < p > < img src ="img/demo.gif " alt ="test " title ="lorem " /> </ p >
182+ < h2 > Examples</ h2 >
183+ < p > A couple of examples can be found the < a href ="http://cihadturhan.github.io/jquery-aim/examples/index.html "> examples page</ a > </ p >
184+ < h2 > Usage</ h2 >
185+ < p > Call the function on the elements to catch user aim and add a class which will be added or removed when aiming starts or ends</ p >
186+ < pre class ="prettyprint linenums lang-language "> < code > $('#target').aim({
187+ className: 'open'
188+ });</ code > </ pre >
189+ < p > If you want to execute a function on aim starts or ends, use the < code > aimEnter</ code > and < code > aimExit</ code > options</ p >
190+ < pre class ="prettyprint linenums lang-language "> < code > $('#hamburger').aim({
191+
192+ aimEnter: function() {
193+ $('#menu').show();
194+ },
195+
196+ aimExit: function(){
197+ $('#menu').hide();
198+ }
199+ });
200+ </ code > </ pre >
201+ < h2 > Debugging</ h2 >
202+ < p > To see where your cursor is aiming and check if it intersects with elements use</ p >
203+ < pre class ="prettyprint linenums lang-language "> < code > $.aim.setDebug(true);</ code > </ pre >
204+ < p > and you will see a rectangle moving around.</ p >
205+ < h2 > Defining own function</ h2 >
206+ < p > If you don't like the default algorithm, define your own by the following procedure</ p >
207+ < pre class ="prettyprint linenums lang-language "> < code >
208+ function anticipateFunc(p, v, mouseX, mouseY, anticipator) {
209+ /*
210+ Calculate the new position of anticipator using inputs
211+ p = {x:number,y:number}
212+ v = {x:number,y:number}
213+ mouseX = number
214+ mouseY = number
215+
216+ Anticipator has some readonly values like the following
217+
218+ {
219+ size: 50,
220+ center: {x: 0, y: 0},
221+ effectiveSize: 1,
222+ rect : {x0: 0, y0: 0, x1: 50, y1: 50}
223+ }
224+
225+ */
226+ }
227+
228+ $.aim.setAnticipateFunction(anticipateFunc);
229+ </ code > </ pre >
230+ </ div >
231+
232+ < div class ="tab-pane fade " id ="changelog " role ="tabpanel " aria-labelledby ="changelog-tab ">
233+ < ul id ="changelogList ">
234+ No changelog available.
235+ </ ul >
236+ </ div >
237+
238+ </ div >
239+
240+ < div class ="tags mb-2 mt-2 ">
241+ < a href ="https://codehimblog.github.io/tag/jquery-aim " class ="text-decoration-none ">
242+ < div class ="d-inline-flex align-items-center bg-light border rounded-pill px-3 py-1 me-2 mb-2 ">
243+ < i class ="bi bi-tag-fill me-2 "> </ i >
244+ < span > jquery-aim</ span >
245+ </ div >
246+ </ a >
247+ </ div >
248+
249+ </ article >
250+
251+
252+ </ main >
253+ <!-- Sidebar -->
254+ < aside class ="col-md-4 p-0 ">
255+ < div class ="sidebar ">
256+ <!-- Owner Section -->
257+ < div class ="sidebar-item mb-4 ">
258+ < div class ="ad-unit ">
259+ < script async src ="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7089100907045419 "
260+ crossorigin ="anonymous "> </ script >
261+ <!-- CodehimBlog Sidebar -->
262+ < ins class ="adsbygoogle "
263+ style ="display:block "
264+ data-ad-client ="ca-pub-7089100907045419 "
265+ data-ad-slot ="8929986923 "
266+ data-ad-format ="auto "
267+ data-full-width-responsive ="true "> </ ins >
268+ < script >
269+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
270+ </ script >
271+ </ div >
272+ < div class ="d-flex align-items-center ">
273+ < img src ="https://avatars.githubusercontent.com/u/3739536?v=4 " alt ="Owner Avatar " class ="rounded-circle me-2 owner-avatar ">
274+ < a href ="https://github.com/cihadturhan " target ="_blank " id ="ownerName " class ="sidebar-link "> cihadturhan</ a >
275+ </ div >
276+ </ div >
277+
278+ <!-- Metadata Section -->
279+ < div class ="sidebar-item mb-2 ">
280+ < div class ="metadata-item d-flex align-items-center ">
281+ < i class ="bi bi-calendar me-2 "> </ i >
282+ < strong > Created At:</ strong >
283+ < span id ="createdAt " class ="ms-1 "> July 16, 2014</ span >
284+ </ div >
285+ < div class ="metadata-item d-flex align-items-center mt-2 ">
286+ < i class ="bi bi-pencil-square me-2 "> </ i >
287+ < strong > Last Updated:</ strong >
288+ < span id ="updatedAt " class ="ms-1 "> October 27, 2024</ span >
289+ </ div >
290+ < div class ="metadata-item d-flex align-items-center mt-2 ">
291+ < i class ="bi bi-file-earmark-code me-2 "> </ i >
292+ < strong > Language:</ strong >
293+ < span id ="language " class ="ms-1 "> JavaScript</ span >
294+ </ div >
295+
296+ < div class ="metadata-item d-flex align-items-center mt-2 ">
297+ < i class ="bi bi-shield-check "> </ i >
298+ < strong > License:</ strong >
299+ < span id ="license " class ="ms-1 "> Unknown</ span >
300+ </ div >
301+ < a href ="# " target ="_blank " class ="btn btn-outline-dark btn-sm " id ="homepageBtn ">
302+ < i class ="bi bi-house-door me-2 "> </ i > Visit Homepage
303+ </ a >
304+
305+ </ div >
306+
307+ < div class ="sidebar-item mb-2 ">
308+ < h5 class ="sidebar-title "> Dependencies</ h5 > < ul class ="dependencies-list "> < li > grunt (~0.4.5)</ li > </ ul > < h5 class ="sidebar-title "> Development Dependencies</ h5 > < ul class ="dependencies-list "> < li > grunt (~0.4.5)</ li > < li > grunt-contrib-uglify (~0.5.0)</ li > </ ul >
309+ </ div >
310+
311+ < div class ="sidebar-item ">
312+ < h5 class ="sidebar-title "> Contributors</ h5 >
313+ < ul class ="p-0 " id ="contributorsList ">
314+ < ul class ="list-group list-group-flush " id ="contributorsList "> < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/3739536?v=4 " alt ="cihadturhan " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/cihadturhan " target ="_blank " class ="text-decoration-none fw-bold "> cihadturhan</ a > < p class ="mb-0 text-muted small "> 7 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/666767?v=4 " alt ="sedovsek " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/sedovsek " target ="_blank " class ="text-decoration-none fw-bold "> sedovsek</ a > < p class ="mb-0 text-muted small "> 4 contributions</ p > </ div > </ li > < li class ="list-group-item d-flex align-items-center contributor-item "> < img src ="https://avatars.githubusercontent.com/u/3905501?v=4 " alt ="bryant1410 " class ="rounded-circle me-3 " style ="width: 40px; height: 40px; "> < div > < a href ="https://github.com/bryant1410 " target ="_blank " class ="text-decoration-none fw-bold "> bryant1410</ a > < p class ="mb-0 text-muted small "> 1 contributions</ p > </ div > </ li > </ ul >
315+ </ ul >
316+
317+ </ div >
318+
319+ < div class ="ad-unit ">
320+ < script async src ="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7089100907045419 "
321+ crossorigin ="anonymous "> </ script >
322+ <!-- CodehimBlog Skyscrapper -->
323+ < ins class ="adsbygoogle "
324+ style ="display:block "
325+ data-ad-client ="ca-pub-7089100907045419 "
326+ data-ad-slot ="7469565592 "
327+ data-ad-format ="auto "
328+ data-full-width-responsive ="true "> </ ins >
329+ < script >
330+ ( adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } ) ;
331+ </ script >
332+ </ div >
333+
334+ </ div >
335+ </ aside >
336+ </ div >
337+ </ div >
338+ <!-- Footer -->
339+ < footer class ="bg-dark text-white text-center py-3 page-footer ">
340+ < div class ="container ">
341+ < p class ="mb-2 "> © 2024 CodehimBlog - Powered by GitHub</ p >
342+ < nav >
343+ < ul class ="list-inline mb-0 ">
344+ < li class ="list-inline-item ">
345+ < a href ="/privacy-policy.html " class ="footer-link "> Privacy Policy</ a >
346+ </ li >
347+ < li class ="list-inline-item ">
348+ < span class ="text-white "> |</ span >
349+ </ li >
350+ < li class ="list-inline-item ">
351+ < a href ="/terms-and-conditions.html " class ="footer-link "> Terms and Conditions</ a >
352+ </ li >
353+ </ ul >
354+ </ nav >
355+ </ div >
356+ </ footer >
357+ <!-- Bootstrap Bundle JS -->
358+ < script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js "> </ script >
359+ < script src ="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js "> </ script >
360+ < script src ="/js/script.js "> </ script >
361+ <!-- Google tag (gtag.js) -->
362+ < script async src ="https://www.googletagmanager.com/gtag/js?id=G-FG2ZX76XGT "> </ script >
363+ < script >
364+ window . dataLayer = window . dataLayer || [ ] ;
365+ function gtag ( ) { dataLayer . push ( arguments ) ; }
366+ gtag ( 'js' , new Date ( ) ) ;
367+
368+ gtag ( 'config' , 'G-FG2ZX76XGT' ) ;
369+ </ script >
370+ </ body >
371+ </ html >
0 commit comments