autocomplete: what's the best way?
supposing to have a javascript array, whats's the best way to autocomplete? i've searched in archive, but all posts are very old...
2 document.ready calls
I have a web page that I need to do some jquery and it has to call when the page loads in the document.ready() call, however, the page is also referencing a JS file that has JQuery and a document.ready() call in it. How can I get the document.ready() call to work on page and not error out on the other document.ready() call in the referenced JS file?
[autocomplete] Get an Session value or Variable value in an ajax request
Hello i have a problem .. I made a little "shop" system for representative. They can make orders, this orders be saved on the database with the id of each user. Then they can view there orders. Now i would create a search field with autocomplete where they can filter the orders by customer name . But the problem is that i can´t hand over the session id of the user or a variable. This way the result: each name in the database get displayed. The PHP is working (it display only the correct names)
Looking for feedback
I am a novice web designer and am close to completing my first full project. I have utilized an responsive nav bar that uses jquery (which I found online.), jquery and jquery ui throughout the site and was seeking some advice as far as best practices and ways to clean up the code. I also have an issue where my site is not recognizing my phone screen size, and is showing the desktop version. Is there a way for me to edit the css with ' @media and screen ' possibly? Also, I had intended for the jquery
Positioning an absolute positioned element with jquery
I'm having an annoying issue trying to position the responsive navigation hamburger. I am using a plugin called responsive menu which creates the hamburger and uses absolute positioning. I am trying to position the hamburger in the centre of the header at all times. To achieve this I am using the following jQuery code. However, the issue I have is when the hamburger is displayed and you scroll down the page and scroll back to the top of the page quickly. The hamburger does not position itself in
why jQuery is not always compatible with prevous versions?
Hi, Sometimes I had several issues with some features that it worked properly with previous versions of jquery. For example, in one of the sites I designed: http://www.el-mejor.com/ I had a beautiful jquery effects in the slider and another in the boxes. The problem is when I update jQuery version some features not work properly with the new version and others features works just with this new version. The question: Is possible to make a jquery compatible with all previous versions? I think that
Link requires 2 clicks to show current info
I'm working on adding the ability to download a Hi-Res version of an image that is in a gallery that utilizes the Elevatezoom plugin on Drupal based website. I've got to the point where I can get the correct image to open in the new window, but only after clicking on the thumbnail image twice! The first click seems setting the link to the currently displayed image(the main image updates, but the link to the hi-res is to the previous image). For example: The page loads with Image A showing in main
ajax page transition applies css of next page
I have a single page based 1.4.5 app using ajax to navigate between the pages. I have two similar style sheets which are loaded in the data-role="page" each time. I have noticed that if alternate between pages (and loading is slow), just before the page loading message disappears it seems to pick up the style sheet from the new page and restyle the current page. It then transitions to the new page which shows correctly. I am not 100% sure what is making it restyle, as I can see the new page is
By pressing Enter inside the password field, submit the form?
I'm trying to achieve that if the focus is on password-field (#edit-password), and the user press the Enter key on his keyboard, the form get submitted: By pressing the Enter key inside the password field, submit the form But in my above example it seems that it doesn't matter if the focus is on password field or on any other field, pressing the Enter key will always submit the form! Why is that?
Function with arguments not working with window.onblur and onfocus
The following code isn't working window.onfocus = welcome("John Doe"); window.onblur = bye("John Doe"); function welcome(name) { $("p").append("Welcome back " +name+ " <br>"); } function bye(name) { $("p").append("Good bye " +name+ " see you soon <br>"); } However I noticed that this code works for custom functions that dont take any argument. See code below. The following code is working: window.onfocus = welcome; //No Argument here so this code works window.onblur = bye; //Same here... No argument
Jquery modal popup
Hi All, In my application, in jquery model popup am calling another aspx page(content.aspx) instead of div content. Another page is loading perfectly,but when i click server side control its open the content.aspx page fully. i want to prevent the postback,and retain the full page in modal popup only. some one help me short out the problems.
jQuery, Accelerated Mobile Pages and Bootstrap
Any ideas on supporting a responsive web site using Bootstrap and jQuery, while also supporting the new format for accelerated mobile pages? We run a travel business with 10,000+ pages and I would like to prevent having to create a separate AMP enabled page for every page - and ensuring we have the canonical reference to the non-AMP page. This would be a lot of work for us. From my research of AMP, we would be stripping out a lot of the whiz-bang cool UI features on our site that make it appealing
How to check an external website for a link to my website
Hi all, I'm very new to jQuery but want to use it to perform a specific task. I'm looking for some code that will enable me to enter a url and check that url for a link back to my website. If it exists then if gives a true message and if doesn't it gives a false message. I have been looking on the internet for some guidance but struggling to find anything that will work for links. Can anyone here help? Thanks Chris
Datepicker custom button disappears when date selected (
Hi, I am trying to create a datepicker where a user would be able to pick multiple dates (datepicker stays open when date is selected). Datepicker closes when clicked outside or Done button clicked. The problems is that when I select a date, Done button disappears. I keep datepicker open with $(this).data('datepicker').inline = true; $(this).data('datepicker').inline = false; I thought keeping datepicker open and having Done button should be a common objective, but I couldn't find any solution
Disable toggle when click on input
I have have a toogle function that is triggered when clicking a row, but when clicking on the input field inside the row I don't want the toggle function to react on that. Is there a way I could make an exception for the toggle when clicking the input, or as an alternative on the cell holding the input?
Save a toogle state to Local Storage
How do I save the toogle state of a row to Local Storage? https://jsfiddle.net/oh2pswk1/3/ So when opening the page again it will have the same rows higlighted.
navigate to main page from anywhere
I am moving my JQM web app to Cordova. I am trying to do an error recovery from ajax in case the use authentication fails no mater where the user is in the app. I would like to be able to navigate back to the main page and then change to the login screen so when the user authenticates I can navigate back and end up at the main page. In the web app, I was just refreshing the main page but I don't think this is a good idea using Cordova. Is it possible to navigate to page one? Thanks.
Jacob Wagschal Intro to jQuery
Hello everyone my name is Jacob Wagdschal and I just wanted to let everyone know that I'm brand new to jQuery and wasn't sure if someone could help me become more familiar jQuery. I wasn't sure exactly what plugins would be best for me to use. If someone is very tech-savvy and could get back to me that would be great, thanks!
Find next <p>" element above "<iframe>" element?
Assume I want to find and hide the next "<p>" element above each "<iframe>" element. Example: <p> sometext ...<p> somesubtext <iframe width="400" ....> ...</iframe> </p> other text .... <p> When the target search filter is not an element but a text I could write: $("p:contains('somesubtext')").eq(($("p:contains('somesubtext')").length) - 1).css("display", "none"); This is working fine. However what if I want to search for an element <iframe> (possibly with an attribute filter). then the following
What does issue 11290 mean to the security of my website
Hello, I know ticket 11290 is very old and fixed a long time ago. Thanks for that. I plan to upgrade my jQuery as fast as I can. Using the Retire.js Chrome plugin I get a warning that the jQuery 1.8.3 I included is vulnerable to 'Selector interpreted as HTML' 1) Do I need to be using a special selector feature of jQuery like using a < in my selector for this bug to be a security issue ? 2) Should I be worried about the overall security of my website ? (I have a website that is only accessible via
using url queryparam name in .js files
Hi.. i am new to jquery, my requirement is , when i click on a button, it will be redirected to some url whhich has some varibale name when i navigate in that new page i need to use that variable name to call other .js scripts any suggestions would be helpful
How to stop Jquery .show from stopping mid slide animation?
I created a DIV that contains an image that is roughly 3100x5400 (4.5MB). The structure looks like this: <div class="sideContent" value="right"> <span class="closeIcon" onclick="closeSlide()" aria-hidden="true">×</span> <div class="container"> <div id="aboutRow" class="row"> <div class="col-md-6" style="height:100%"> <img id="aboutMeImage" src="Images/JPG/_P7J4523.jpg"> </div> <div class="col-md-6" style="height:100%"> <div id="aboutContent"> <h1> Biography </h1> <p></p> <h1> Stats </h1> <p></p>
How to add a span inside a label using jQuery
How can I add a span inside a label using jQuery? Before: <label for="edit-pass" class="abel-floated">Password</label> After: <label for="edit-pass" class="abel-floated"><span>Some Hint</span>Password</label> Thanks
on focusout for radio/checkboxes
I'm trying to fire a focusout after clicking away from radio & checkbox input. Here's typ. html: <form class="cd-form"> <div> <ul class="cd-form-list"> <li> <input type="radio" ...> </input> </li> <li> ... </ul> </div> ... other input elements </form> Here's the jquery I'm trying to use, as input is a child of the ul : $('form.cd-form ul.cd-form-list').on('focusout', function() { console.log('Focusout occured'); }); I'm not getting console log
Is it possible to use the latest jQuery with the latest jQueryUI?
I'm using jQuery UI 1.11.4 and this zipfile comes with jQuery v1.10.2. I replaced this old version with jQuery v2.2.4. I didn't notice any problem with our application. Am I risking something with using the latest stable version of jQuery?
jquery data table export image column
hi, while export to pdf or excel in jquery data table , the image colmn show empty cells not showing image. how to resolve . pls help Thanks
To enable 3 options on accordion widget just started
Hi. Please help me turn on three options of Accordion just strarted: Default functionality, Collapse content & No auto heigth in the html tags <script> ... </script>. Thanks a lot
JQuery Autocomplete:Issue with getting HTML Element Id.
Hi All, I am using Jquery Autocomplete in .net project.I do have three dropdownlist and they are using same piece of code .I want to call a function in Change() event only for a particular drop down list.So how to know which element is in running state, means i want to know the id of "this" element, so that i can differentiate between the dropdownlist. The highlighted is the code which I am trying.I need to call SelectJournalName("0"); if ddlJournalList has null value.so i know half code just need
Dynamic Form creation not working
Hi, I've been trying to create a form by appending to <div id='what'> with no success. The form displays fine including data values but the submit does not display the alert() message. My goal is to view the data returned, change the data if desired, and send the changed data thru AJAX to update my MySql database. function showReturn(data) { // <========= data is returned from AJAX. $("#results").hide(); // hide previous $("#what").show(); // show current $("#what").append("<form method='post'
How do I get my unordered list items counter to work in jquery?
Hello there!! I created a to do list with a delete button on the right side of each list item. When you type an entry it goes into the ul tag listing everything. How do I get the " counter " of my unordered list items to dynamically reflect both added and deleted items from my " to do list "? I basically need a numeric value displayed in my id called " counter ". I have been working on this for a few days and I just do not know what to do. Maybe there is something I am over looking that is so
find text position in an element
The following is for a complicated application I'm writing. I don't expect the first question can be answered, but why not try: 1) Suppose I have an element such as ARTICLE with an id such as "myArticle". If the user clicks his mouse inside that element, I can find the position of the mouse (using .offset or something like that), but is there a way to find the text offset? I don't see how there could be, unless the text letters were all the same width, (as in Courier font) and only if I knew there
New Modeless Window based on contents
Hi, I have a requirement to open a new mode-less window based on its contents. That means window should be resizable. We can not give the definite size to window. So how to provide size to the window dynamically using Jquery/Javascript/AJAX? Please provide solution ASAP. Thanks, Smita
Start timer with mention time and date using js
Hello all, I have been trying to get the timer set with the mention date and time. Below is the code i tried so far. <html> <head> <title></title> </head> <body onload="timer();"> <script type="text/javascript"> function timer() { var now = new Date(); var outStr = now.getHours()+':'+now.getMinutes()+':'+now.getSeconds(); document.getElementById('clockDiv').innerHTML=outStr; setTimeout('timer()',1000); } timer(); </script> <div id="clockDiv"></div> </body> </html> The above code gives
jQuery not working with WordPress
I’m moving a site over to wordpress and cannot get the dot navigation on the right hand side to work (see: http://s593006646.websitehome.co.uk ). The .js file is below. I believe there is an issue with lines 2-4 but beyond that I've no idea where to turn. Any help is much appreciated! jQuery(document).ready(function(){ jQuery('.awesome-tooltip').tooltip({ placement: 'left' }); jQuery(window).bind('scroll',function(e){ dotnavigation(); }); function dotnavigation(){
jquery mobile 1.3.2 multi page template
hi you all. i've the following situation: <div data-role="page" id="page1"> <div data-role="panel" id="mypanel">
<a href="#page-href" class="ui-link-inherit"> </div>
<div data-role="header">...</div>
<div data-role="content">...</div>
<div data-role="footer">...</div>
</div> <div data-role="page" id="page2">
<div data-role="header">...</div>
<div data-role="content">...</div>
<div data-role="footer">...</div>
</div> the question is: i want to use a single page and navigate by DOM ...
Too easy but failed - get the top position of each td after AJAX response
Just give me a little hint how can I get alert('top=='+evto); [index.php]--------------------------------------------------- <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Loop through an array using jQuery</title> <script src="https://code.jquery.com/jquery-2.2.3.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script type="text/javascript"> $(document).ready(function () { var dataj ={'ss':'ss',
jQuery responsive menu options (example included)
I want to have a menu similar to the one this site has http://eng.getlost-getnatural.ru/, is there anything that jQuery has to get a menu that is first 3 dashed lines and then when clicked turns into an "x" and is showed as an overlay above the page?
Does jQuery have something that can achieve full page scrolling effect (example included)
Is there anything (a plugin would be ideal but am open to anything if jQuery offers something that will help to get that effect) that jQuery provides that would help to achieve an effect similar to that of this website (how the page seems to scroll/jump to a new page when the user scrolls down) http://eng.getlost-getnatural.ru/.
icon resize according to device resolution
maybe a stupid question: there is a way using jquery.mobile to resize a png icon on mobiles and tablet? i would like to have my icon (a single one, share button) big enought to be visible. thank you.
Find position of option in select
I've a bit of code taking two lists of related data. A code and a name for an organisation. The code and name need to be in different dropdown lists (as directed from management). I'm populating the select options from an arraylist (in a jsp). Is there a way to find out out what position in the list of options a value is, in order to change the select in the other dropdown list. So if the third in the list of options for code was selected, the third in the list of name would change to the third option
Next Page