| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
| "http://www.w3.org/TR/html4/strict.dtd">
|
| <html lang="en">
|
|
|
| <head>
|
| <meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
|
|
|
| <link type="text/css" href="/static/js/jquery-ui-1.13.2/jquery-ui.min.css" rel="stylesheet">
|
| <link type="text/css" href="/static/js/jquery-ui-1.13.2/jquery-ui.theme.min.css" rel="stylesheet">
|
| <link type="text/css" href="/static/footer.css" rel="stylesheet">
|
| <link type="text/css" href="/static/print.css" rel="stylesheet">
|
|
|
| <LINK REL="stylesheet" TYPE="text/css" HREF="/static/search_desktop_v20.css?v=20241118-1">
|
|
|
|
|
|
|
| <script async src="https://www.googletagmanager.com/gtag/js?id=G-HML2J37TKY"></script>
|
| <script>
|
| window.dataLayer = window.dataLayer || [];
|
| function gtag(){dataLayer.push(arguments);}
|
| gtag('js', new Date());
|
| gtag('config', 'G-HML2J37TKY');
|
| </script>
|
|
|
| <TITLE>Arshad Ahmed Age 24 Years S/O Mohd. ... vs Union Territory Of Jammu & Kashmir ... on 27 March, 2023</TITLE>
|
|
|
|
|
|
|
| </head>
|
| <body class="">
|
|
|
| <a href="#main-content" class="skip-link">Skip to main content</a>
|
|
|
| <header class="main-header" role="banner">
|
| <h1 class="sr-only">Indian Kanoon - Search engine for Indian Law</h1>
|
| <div class="header-container">
|
|
|
|
|
| <div class="header-logo">
|
| <a href="/" aria-label="Indian Kanoon Home">
|
|
|
|
|
| <img src="/static/pics/ikanoon7_large.png" alt="Indian Kanoon" class="header-logo-img">
|
|
|
|
|
|
|
| </a>
|
| </div>
|
|
|
|
|
|
|
|
|
|
|
| <div class="header-search" role="search">
|
| <h2 class="sr-only">Search</h2>
|
| <form method="GET" action="/search/" class="search-form">
|
| <label for="header-search-box" class="sr-only">Search Indian laws and judgments</label>
|
| <input type="text" name="formInput" class="searchbox" id="header-search-box"
|
| placeholder="Search laws, court judgments and everything else ..."
|
| value="bail IPC doctypes: highcourts" autocomplete="off">
|
| <input type="submit" value="Search" class="submitbutton header-submitbutton" id="header-submit-button">
|
| </form>
|
| </div>
|
|
|
|
|
|
|
|
|
| <div class="header-nav">
|
|
|
| <nav class="nav-desktop" aria-label="Main navigation">
|
| <h2 class="sr-only">Main Navigation</h2>
|
|
|
| <a href="/free_features/" class="nav-link">Free features</a>
|
| <div class="premium-dropdown">
|
| <button class="nav-link premium-dropdown-btn" id="premium-dropdown-btn" aria-expanded="false" aria-controls="premium-dropdown-menu" aria-haspopup="true">
|
| Premium
|
| <svg width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
| <polyline points="3 4.5 6 7.5 9 4.5"></polyline>
|
| </svg>
|
| </button>
|
| <div class="premium-dropdown-menu" id="premium-dropdown-menu" role="menu" aria-hidden="true">
|
| <a href="/premium/" class="premium-dropdown-item" role="menuitem">Premium features</a>
|
|
|
| </div>
|
| </div>
|
| <a href="/prism/" class="nav-link brand-prism">Prism AI</a>
|
| <a href="/prism/pricing" class="nav-link">Pricing</a>
|
|
|
| <a href="/members/login/" class="nav-link">Login</a>
|
|
|
|
|
| </nav>
|
|
|
|
|
| <button class="mobile-menu-btn" id="mobile-menu-btn" aria-label="Open mobile menu" aria-expanded="false" aria-controls="mobile-menu">
|
| <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
| <line x1="3" y1="6" x2="21" y2="6"></line>
|
| <line x1="3" y1="12" x2="21" y2="12"></line>
|
| <line x1="3" y1="18" x2="21" y2="18"></line>
|
| </svg>
|
| </button>
|
| </div>
|
| </div>
|
|
|
|
|
| <nav class="mobile-menu" id="mobile-menu" aria-label="Mobile navigation" aria-hidden="true">
|
| <h2 class="sr-only">Mobile Navigation</h2>
|
| <div class="mobile-menu-content">
|
|
|
| <a href="/free_features/" class="mobile-nav-link">Free features</a>
|
| <div class="premium-dropdown mobile">
|
| <div class="mobile-nav-link premium-dropdown-header">Premium</div>
|
| <a href="/premium/" class="mobile-nav-link premium-dropdown-item">Premium features</a>
|
|
|
| </div>
|
| <a href="/prism/" class="mobile-nav-link brand-prism">Prism AI</a>
|
| <a href="/prism/pricing" class="mobile-nav-link">Pricing</a>
|
|
|
| <a href="/members/login/" class="mobile-nav-link">Login</a>
|
|
|
|
|
| </div>
|
| </nav>
|
| </header>
|
|
|
| <main id="main-content" role="main">
|
|
|
| <div class="info_all" role="region" aria-label="Information content">
|
| <article class="info_indian_kanoon">
|
|
|
| <h2 class="sr-only">Document Fragment View</h2>
|
| <header class="docfragment_header" role="banner">
|
| <div class="docfragment_info">
|
| <h3 class="sr-only">Fragment Information</h3>
|
| <span class="docfragment_label" id="context-label">Showing contexts for:</span>
|
| <span class="docfragment_query" aria-labelledby="context-label">bail IPC </span>
|
| <span class="docfragment_in">in</span>
|
| <a href="/doc/107499296/" class="docfragment_title_link" aria-label="View full document: Arshad Ahmed Age 24 Years S/O Mohd. ... vs Union Territory Of Jammu & Kashmir ... on 27 March, 2023">Arshad Ahmed Age 24 Years S/O Mohd. ... vs Union Territory Of Jammu & Kashmir ... on 27 March, 2023</a>
|
| </div>
|
| <nav class="change_context" aria-label="Context size options">
|
| <h4 class="sr-only">Context Size Options</h4>
|
| <span class="change_context_label" id="context-size-label">Context size:</span>
|
| <div class="context_buttons" role="group" aria-labelledby="context-size-label">
|
|
|
|
|
| <form method="GET" action="/docfragment/107499296/" class="context_button_form">
|
| <input type="hidden" name="big" value="0"/>
|
| <input type="hidden" name="formInput" value="bail IPC doctypes: highcourts"/>
|
| <button type="submit" class="context_button" aria-label="Change to Small context size">Small</button>
|
| </form>
|
|
|
|
|
|
|
| <span class="context_button context_button_active" aria-current="true" aria-label="Current context size, currently selected">Current</span>
|
|
|
|
|
|
|
| <form method="GET" action="/docfragment/107499296/" class="context_button_form">
|
| <input type="hidden" name="big" value="2"/>
|
| <input type="hidden" name="formInput" value="bail IPC doctypes: highcourts"/>
|
| <button type="submit" class="context_button" aria-label="Change to Large context size">Large</button>
|
| </form>
|
|
|
|
|
|
|
| <form method="GET" action="/docfragment/107499296/" class="context_button_form">
|
| <input type="hidden" name="big" value="3"/>
|
| <input type="hidden" name="formInput" value="bail IPC doctypes: highcourts"/>
|
| <button type="submit" class="context_button" aria-label="Change to Larger context size">Larger</button>
|
| </form>
|
|
|
|
|
| </div>
|
| </nav>
|
| </header>
|
| <article class="expanded_headline" role="article" aria-label="Document fragments matching your search">
|
| <h3 class="sr-only">Matching Fragments</h3>
|
|
|
| <section class="fragment">
|
| <p data-structure="Issue" id="p_1"> SHO Police Station, Udhampur
|
| Through :- Mr. Sumeet Bhatia, GA.
|
| </p>
|
| <p data-structure="Issue" id="p_2"> Coram: HON'BLE MR. JUSTICE MOHAN LAL, JUDGE
|
|
|
| OR D E R
|
| 27.03.2023
|
| </p><p data-structure="Facts" id="p_3">1. Petitioner has invoked the jurisdiction of this Court in terms of <a href="/doc/1290514/" id="a_1">Section 439</a> of
|
| the <b><b>Code</b></b> of Criminal Procedure (hereinafter referred to as the, "<b><b>Code</b></b>") for
|
| securing <b><b>bail</b></b> to him in FIR No. 640/2020 registered with Police Station
|
| Udhampur for commission of offences under <a href="/doc/1146308/" id="a_2">Sections 366</a>, <a href="/doc/11461/" id="a_3">109</a> & <a href="/doc/482448/" id="a_4">376</a> RPC. It
|
| is averred, that petitioner is a citizen of India and permanent resident of UT of
|
| Jammu and Kashmir and is entitled to the enjoyment of all the fundamental
|
| rights envisaged under part-III of the Constitution of India as well as the other
|
| legal and statutory rights framed there under; that the learned Additional
|
| Sessions Judge Udhampur has rejected the <b><b>bail</b></b> of the petitioner vide its order
|
| dated 04.01.2023; that the petitioner and the complainant/prosecutrix being
|
| major were having love affair with each other, which prompted them to marry
|
| each other out of their free will and without any force and coercion, the
|
| petitioner and the complainant/prosecutrix performed Nikah Nama with each
|
| other on 01.12.2020 in accordance with the rights and rituals of Muslim law and
|
| both of them declared themselves as legally wedded husband and wife,
|
| whereafter they entered into marital relation with each other out of their own free
|
| will and consent. It is further averred, that in pursuance to the said marriage, the
|
| petitioner and the prosecutrix executed marriage agreement and affidavit dated
|
| 02.12.2020 duly attested/registered by the public notary, petitioner and
|
| prosecutrix/complainant started living as husband and wife in Village Jindrah
|
| Jorgah Tehsil Dansal District Jammu, but on 04.12.2020 within few days, the
|
| father and the relatives of the complainant/prosecutrix took away her forcibly
|
|
|
|
|
| without the consent of the petitioner, whereby, petitioner was constrained to file
|
| an application under <a href="/doc/358646/" id="a_5">Section 97</a> of the <b><b>Code</b></b> before the Court for issuance of
|
| search warrants for recovery of his wife, who was produced before the Court at
|
| Jammu, the father-in-law and other relatives instigated the wife of the petitioner
|
| to lodge a false and frivolous FIR as the petitioner had made them party in the
|
| said application under <a href="/doc/358646/" id="a_6">Section 97</a> of the <b><b>Code</b></b> before the Court of learned 2nd
|
| Additional Munsiff Jammu. It is averred, that after registration of the FIR against
|
| the petitioner, which was initially registered under <a href="/doc/796352/" id="a_7">Sections 366</a> and <a href="/doc/513074/" id="a_8">109</a> of the
|
| IPC by the complainant/prosecutrix, the petitioner was arrested on 22.12.2020
|
| and was granted <b><b>bail</b></b> by the Court on 28.12.2020, whereafter, on 01.01.2021,
|
| respondent got the statement of the complainant/prosecutrix recorded under
|
| <a href="/doc/78014276/" id="a_9">Section 164</a> of the <b><b>Code</b></b> before the Court of learned Additional Special Mobile
|
| Magistrate Udhampur, wherein, respondent registered the offence of rape under
|
| <a href="/doc/1279834/" id="a_10">Section 376</a> of the IPC against the petitioner, on 05.01.2021 respondent got
|
| medical examination of the prosecutrix conducted, however, on 16.04.2021
|
| petitioner was again arrested by the police of police post Roun Udhampur in the
|
| aforesaid FIR in view of the subsequent offence added under <a href="/doc/1279834/" id="a_11">Section 376</a> of the
|
| IPC against him, on which date petitioner was already on <b><b>bail</b></b>. It is moreso
|
| averred, that on the re-arrest of petitioner on 16-04-2021 for the last almost 2
|
| years petitioner is languishing in District Jail Udhampur without any fault on his
|
| part, prayer has been made for grant of <b><b>bail</b></b>.
|
| </p>
|
| </section>
|
|
|
| <section class="fragment">
|
|
|
| <p data-structure="PetArg" id="p_5">3. Learned counsel for the petitioner/accused while supporting the case of
|
| petitioner for <b><b>bail</b></b> has vehemently canvassed arguments, that the date of
|
| occurrence pertains to 28.11.2020 whereas FIR was lodged on 18.12.2020 after
|
| unexplained delay of 20 days for commission of offence of kidnapping under
|
| <a href="/doc/796352/" id="a_17">Sections 366</a> & <a href="/doc/513074/" id="a_18">109</a> IPC, whereafter the petitioner was arrested on 22.12.2020
|
| and was <b><b>bailed</b></b> out on 28.12.2020. It is argued, that the statement of the
|
| prosecutrix was recorded<a href="/doc/78014276/" id="a_19"> u/s 164</a> Cr.pc by the I/O on 30.12.2020 after delay of
|
| more than one month from the date of occurrence and after the delay of 26 days
|
| from the date of 04.12.2020 when the prosecutrix got herself free from the
|
| clutches of the petitioner/accused, the delay in recording the FIR as well as the
|
| statement of the prosecutrix has remained unexplained which is seriously fatal
|
| for the prosecution. It is also argued, that the petitioner was already on <b><b>bail</b></b> in the
|
| impugned FIR for the allegations of commission of offences u/ss 366/109, <a href="/doc/1569253/" id="a_20">IPC</a>
|
| by the Court of learned Munsiff Judicial Magistrate (Traffic) Udhampur, and
|
| when the offence of rape under <a href="/doc/1279834/" id="a_21">Section 376</a> of the IPC was added on 30.12.2020
|
| on the statement of the prosecutrix, the petitioner was re-arrested on 16.04.2021
|
| when he was already on <b><b>bail</b></b>, even the respondent/State did not apply for
|
| cancellation of earlier <b><b>bail</b></b> and seeking the custody of the petitioner, the
|
| petitioner was re-arrested simply without following due procedure of law by the
|
| respondent No. 1 when the offence of rape under <a href="/doc/1279834/" id="a_22">Section 376</a> of the IPC was
|
| added. It is strenuously argued, that re-arrest of the petitioner/accused is in
|
| violation of the provisions of <a href="/doc/1667941/" id="a_23">Section 439(2)</a> of the <b><b>Code</b></b>, as the State did not
|
| apply for cancellation of the earlier <b><b>bail</b></b>, and during the said period of the
|
| operation of earlier <b><b>bail</b></b>, petitioner/accused was re-arrested. To support his
|
| arguments, learned counsel for the petitioner has relied upon the judgment of the
|
| Hon'ble Supreme Court rendered in Petition for Special Leave to Appeal
|
| (Crl.) No. 10179 of 2017 in C.R.L. WP No. 3582 of 2017 dated 07-05-2018
|
| [Manoj Suresh Jadhav and Ors.--Petitioners Versus The State of Maharashtra--
|
| Respondent].
|
| </p>
|
| </section>
|
|
|
| <section class="fragment">
|
| <blockquote id="blockquote_7">cases lay down an invariable principle of law that the basic jurisprudence
|
| relating to <b><b>bail</b></b> remains the same, inasmuch as, the "grant of <b><b>bail</b></b> is the rule" and
|
| "refusal is an exception". It is apt to reiterate here, that the scanned record
|
| depicts, that the petitioner/accused alongwith two co-accused namely Riaz
|
| Ahmed and Mohd. Mansha has been <b><b>bailed</b></b> out in the impugned FIR. The
|
| allegations as emerge out from the prosecution story against the petitioner are,
|
| that he alongwith the co-accused abducted the prosecutrix/victim on 28.12.2020
|
| at 11.00 pm from their village and took her to Jammu. Initially, FIR was lodged
|
| against the petitioner and other co-accused persons for commission of offences
|
| u/ss 366/109 of <a href="/doc/1569253/" id="a_30">IPC</a>, wherein the petitioner and other two co-accused were
|
| granted <b><b>bail</b></b> by the Court of learned Disrict Judicial Mobile Magistrate (Traffic)
|
| Udhampur on 28.12.2020. On 04.12.2020, when as per the prosecution story,
|
| the victim/prosecutrix managed to flee from the clutches of the
|
| petitioner/accused, she got her statement recorded under <a href="/doc/78014276/" id="a_31">Section 164</a> Cr.pc
|
| before I/O on 30.12.2020 after delay of 26 days and got added the offence of
|
| rape<a href="/doc/1279834/" id="a_32"> u/s 376</a> of IPC against the petitioner who was re-arrested on 16.04.2021 for
|
| addition of offence<a href="/doc/1279834/" id="a_33"> u/s 376</a> IPC, and for the last almost 2 years is lying in
|
|
|
|
|
| incarceration in District Jail Udhampur. It is pertinent to mention here, that
|
| alongwith the <b><b>bail</b></b> application, petitioner has annexed certified copies of the
|
| Nikah Nama, marriage agreement and the Affidavits of himself and that of the
|
| prosecutrix. It appears that the marriage agreement between the petitioner and
|
| prosecutrix has been executed on 02.12.2020 at Jammu and duly attested by the
|
| Public Notary and the same bears the signatures and thumb impression of the
|
| petitioner and the prosecutrix. The affidavits sworn by the petitioner and the
|
| prosecutrix also bear their signatures and thumb impression. Both the documents
|
| of marriage agreement and the affidavits demonstrate/hint towards the fact of
|
| love affair between the petitioner and the prosecutrix/victim, which love affair
|
| severed into wrong side and landed the petitioner/accused in jail.
|
| </blockquote>
|
| </section>
|
|
|
| <section class="fragment">
|
| <p data-structure="CDiscource" id="p_12">6. In Petition for Special Leave to Appeal (Crl.) No. 10179 of 2017 in C.R.L.
|
| WP No. 3582 of 2017 dated 07-05-2018 [Manoj Suresh Jadhav and Ors.--
|
| Petitioners Versus The State of Maharashtra--Respondent] relied by Ld.
|
| Counsel for petitioner, Hon'ble Supreme Court while appreciating the provisions
|
| of <a href="/doc/1667941/" id="a_34">Section 439(2)</a> of Cr.pc held, that when the accused is already on <b><b>bail</b></b> in FIR
|
| and subsequently some offence is added, it is not permissible for the
|
| respondent/state to simply re-arrest petitioner/accused by ignoring earlier <b><b>bail</b></b>
|
| order which was in force at that time, therefore, the State/respondent is at liberty
|
| to apply for cancellation of earlier <b><b>bail</b></b> and seek the custody of the accused in
|
| regard to the offence added. Ratio of the judgment (Supra) squarely applies to
|
| the facts of the case in hand. In the case in hand, in FIR No. 640/2020
|
| petitioner/accused was already granted regular <b><b>bail</b></b> on 28.12.2020 by the Court
|
| of learned District Judicial Mobile Magistrate (Traffic) Udhampur for offences
|
| u/ss 366/109 <a href="/doc/1569253/" id="a_35">IPC</a>. With the addition of offence<a href="/doc/1279834/" id="a_36"> u/s 376</a> IPC against the
|
| petitioner/accused on the statement of prosecutrix recorded after a delay of about
|
| 26 days, the earlier <b><b>bail</b></b> order dated 28.12.2020 was subsisting/continuing/was in
|
| force, therefore, it was not permissible for respondent/investigating agency to
|
| simply arrest petitioner/accused on 16-04-2021, therefore, in terms of provision
|
| of <a href="/doc/1667941/" id="a_37">section 439(2)</a> Cr.pc, respondent/UT was at liberty to apply for cancellation of
|
| earlier <b><b>bail</b></b> dated 28-12-2020 and seek the custody of petitioner/accused with
|
| addition of offence of rape<a href="/doc/1279834/" id="a_38"> u/s 376</a> IPC against him. Scanned record submitted
|
| by the court below does not depict that such a procedure has been strictly
|
| complied by the respondent/UT, therefore, re-arrest of the petitioner/accused in
|
| the same FIR with addition of offence of rape against him under <a href="/doc/1279834/" id="a_39">Section 376</a> of
|
| the IPC is not legally permissible. It is apt to reiterate here, for the last almost 2
|
|
|
|
|
| years petitioner is languishing in incarceration in District Jail Udhampur. Record
|
| further demonstrates that in the FIR recorded at the earlier stage on 18.12.2020
|
| there is no whisper of the commission of offence of rape. On 04.12.2020, when
|
| the prosecutrix got herself freed from the custody of the petitioner, she got her
|
| statement recorded on 30.12.2020 after the delay of 26 days which has remained
|
| unexplained. The marriage agreement and the affidavits sworn by the petitioner
|
| and the victim/prosecutrix are evidence of the fact that the love affair existed
|
| between them, moreso, the prosecutrix has herself admitted in her affidavit that
|
| she is wife of the petitioner. The allegations of rape against the petitioner are to
|
| be proved during the trial of the case. However, without commenting upon the
|
| merits of the case, the petitioner has carved out a strong case of grant of <b><b>bail</b></b> in
|
| his favour. Accordingly, the <b><b>bail</b></b> application is allowed and petitioner/accused is
|
| admitted to <b><b>bail</b></b> in the sum of Rs. 50,000/- to the satisfaction of the Registrar
|
| Judicial of this Court with a direction to furnish personal bond of like amount
|
| before the Superintendent/Incharge District Jail Udhampur where he is presently
|
| lodged. However, before parting, the following conditions are imposed upon the
|
| petitioner:-
|
| </p>
|
| </section>
|
|
|
| </article>
|
|
|
| <div class="docfragment_research">
|
|
|
|
|
|
|
| </div>
|
|
|
| </article>
|
| </div>
|
|
|
| </main>
|
|
|
| <footer class="homepage-footer">
|
| <div class="homepage-footer-links">
|
| <a href="/about.html">About</a>
|
| <a href="/disclaimer.html">Disclaimer</a>
|
| <a href="/privacy.html">Privacy Policy</a>
|
| <a href="/members/terms/">Terms</a>
|
| <a href="/court_case_online.html">Case Removal</a>
|
| <a href="https://blog.indiankanoon.org">Blog</a>
|
| <button id="share-url-btn" style="display: none;">Share URL</button>
|
|
|
| <form method="post" action="/change_device/?device=mobile&nextpage=/docfragment/107499296/%3FformInput%3Dbail%2520IPC%2520%2520doctypes%253A%2520highcourts" class="device-toggle">
|
| <input type="hidden" name="csrfmiddlewaretoken" value="qtHcPWzD6B4rIZItdgrlbuw29ebEToIOlZMBuDYHclVlge1YQhqmFDP8dzqN03z6">
|
| <button type="submit">Mobile View</button>
|
| </form>
|
| </div>
|
| </footer>
|
|
|
| <script>
|
| (function() {
|
| const shareBtn = document.getElementById('share-url-btn');
|
|
|
| if (navigator.share) {
|
| shareBtn.style.display = 'inline-block';
|
|
|
| shareBtn.addEventListener('click', async function() {
|
| try {
|
| await navigator.share({
|
| title: document.title,
|
| url: window.location.href
|
| });
|
| } catch (err) {
|
| if (err.name !== 'AbortError') {
|
| console.error('Error sharing:', err);
|
| }
|
| }
|
| });
|
| }
|
| })();
|
| </script>
|
|
|
|
|
|
|
| <SCRIPT TYPE="text/javascript" SRC="/static/js/jquery-3.6.1.min.js"></SCRIPT>
|
| <SCRIPT TYPE="text/javascript" SRC="/static/js/jquery-ui-1.13.2/jquery-ui.min.js"></SCRIPT>
|
| <SCRIPT TYPE="text/javascript" SRC="/static/js/pylaw/utils_v13.js"></SCRIPT>
|
| <SCRIPT TYPE="text/javascript" SRC="/static/js/pylaw/share_url.js"></SCRIPT>
|
| <SCRIPT TYPE="text/javascript" SRC="/static/js/pylaw/dropdown.js"></SCRIPT>
|
|
|
|
|
| <script type="text/javascript">
|
| $(document).ready(function () {
|
| $('.searchbox_top a').button();
|
| });
|
| </script>
|
|
|
| <script type="text/javascript">
|
| $(document).ready(function() {
|
| $('.searchbox_docfragment a').button();
|
| });
|
| </script>
|
|
|
|
|
| <script type="text/javascript">
|
| (function($) {
|
| function ensureAutocompleteAvailable() {
|
| if (!($.ui && $.ui.autocomplete)) {
|
| throw new Error('jQuery UI Autocomplete plugin not loaded');
|
| }
|
| }
|
|
|
| function overrideGlobalRenderer() {
|
| $.ui.autocomplete.prototype._renderItem = function(ul, item) {
|
| return $("<li></li>")
|
| .append(
|
| $("<div></div>")
|
| .addClass("search-autocomplete-item-wrapper")
|
| .html(item.label)
|
| )
|
| .appendTo(ul);
|
| };
|
| }
|
|
|
| function attachAutocomplete($input) {
|
| if (!$input.length) {
|
| return;
|
| }
|
|
|
| var $form = $input.closest('form');
|
|
|
| $input.autocomplete({
|
| source: "/qsuggest/",
|
| delay: 180,
|
| minLength: 2,
|
| appendTo: 'body',
|
| position: {
|
| my: "left top",
|
| at: "left bottom+6",
|
| collision: "flipfit"
|
| },
|
| classes: {
|
| "ui-autocomplete": "search-autocomplete-list",
|
| "ui-menu-item-wrapper": "search-autocomplete-item"
|
| },
|
| open: function() {
|
| var $menu = $input.autocomplete('widget');
|
| var offset = $input.offset();
|
| $menu
|
| .width($input.outerWidth())
|
| .css({
|
| left: offset.left,
|
| top: offset.top + $input.outerHeight() + 6
|
| });
|
| $input.addClass('autocomplete-open');
|
| },
|
| close: function() {
|
| $input.removeClass('autocomplete-open');
|
| },
|
| focus: function(event, ui) {
|
|
|
| if (ui && ui.item) {
|
| event.preventDefault();
|
| }
|
| },
|
| select: function(event, ui) {
|
| event.preventDefault();
|
| if (ui && ui.item) {
|
| $input.val(ui.item.value);
|
| }
|
|
|
| if ($form.length) {
|
| $form.trigger('submit');
|
| } else {
|
| $('#search-form').trigger('submit');
|
| }
|
| }
|
| });
|
|
|
| }
|
|
|
| $(document).ready(function() {
|
| ensureAutocompleteAvailable();
|
| overrideGlobalRenderer();
|
| attachAutocomplete($("#search-box"));
|
| attachAutocomplete($("#header-search-box"));
|
| });
|
| })(jQuery);
|
| </script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| <script>(function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'9c56aafc1a95598e',t:'MTc2OTY2ODA5MA=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script></body>
|
|
|
| </html>
|
|
|