autocomplete focus wihout filtering on type
Hi, i have autocomplete opening without typing a letter (just like a simple dropdownlist): $('#input').bind('focus', function(){ $(this).autocomplete('search'); Now when i type some letter, i need to set focus on first matching item of list. I don't need to filter my list, just focus on element.
create a simple popup box
Today i will show you how to create a simple popup box with close button, no need 3th-party plugins, just one file html and jquery library. <!DOCTYPE html> <html> <head> <meta charset='utf-8'/> <title>jQuery Popup Box Demo</title> <script src="jquery-1.9.0.min.js"></script> <script> $(document).ready(function(){ $('h1').click(function(){ //you click into h1 $('.hiddenbox').fadeIn(); //show popup box $('div:not(".hiddenbox")').hide(); //hide all elements except class hiddenbox $('.hiddenbox').appendTo('body');
load & unload
i can load pages using "load" and is it poosbile to unload this pages (any command like unload) likewise css file for example $("#l5").bind('click',function(){ $('#irtibat').load('contact.html');how can i unload this page $("head").append("<link>"); var css = $("head").children(":last"); css.attr({ rel: "stylesheet", type: "text/css", href: "main.css" }); how can i unload this css file
Table filling and row edit/deletion
So! So far I'm doing fairly well as to what I want to do with an application, where you input a few sets of data, and it's sent to a table. I'm not sure, however, how to enable a little section that would allow me to edit/delete a single line. Here is my HTML, if necessary ( the last two columns without labels will be the top to the edit/delete areas ): <table id="log" class="table table-striped" width="100%"> <tr> <th width="15%">Customer Code</th> <th width="15%">Project
create jquery functions in separate files
Hello: I would like to have separate files for my jquery. I would like to create an object such as .billing() and when a user clicks the submit button on a form it calls .billing() on another file and it processes the information from the form. Without writing an involved plugin; how do I do this? or how do I set up the separate file that it can be called from the main.php page? Thanks, shoeGirl
Starting browser window
Hi I am developing a museum kiosk using jquery...I've got it working, but talking to the museum planners, they want the kiosk to restart after a specific time period...so a new person coming to the kiosk will start at the beginning of the interaction. What I have are five panels, and each panel has media, like video and audio...when someone selects Introduction, they will get audio and video associated with the introduction, and it goes through each section/panel as a narrative. So, after one user
Strange behavior in my menubar
I'm trying to make a menubar with HTML, CSS and jQuery. It is working, kind of. When i hover over my main-menu, the submenu appears. But, if I try to move my mouse down past the first submenu, it disappears. Here's my fiddle: http://jsfiddle.net/ZfN7t/18/
jQuery Slideshows make shift-like movement on home page
When viewing on an apple device, the home.php page of my wordpress site makes a shift like movement when the slideshows transition. I've included my code below. I'm unsure if it's jquery or CSS related... any ideas? I can provide css, if needed. Thanks! <script> $(function(){ $('.QuoteSS img:gt(0)').hide(); setInterval(function(){ $('.QuoteSS :first-child').fadeOut() .next('img').fadeIn() .end().appendTo('.QuoteSS');}, 6000); }); $(function(){ $('.ServiceSS
how to find the actual height and width of the image
$(function(){ // JUST FOR THE DEMO var randNum = Math.floor((Math.random()*2)+1); var pathsChoices = {"1":"/images/RESOURSES/im123.jpg", "2":"/images/PDF/im123.jpg"}; var imgPath = pathsChoices[randNum]; // END OF DEMO'S RELATED VARS // resultIP is the response image path var imgDirectory = imgPath.split('/'); // cuts into: '','images','PDF','im123.jpg' $('body').append('<p>Path selected is: '+imgPath+'.</p>'); alert('the directory
how to compare the return value ?
in response image path i am getting "/images/RECOURSES/im123.jpg" or "/images/PDF/im123.jpg" so how can i compare that response valuse is coming from resources folder or not.... how to use that image is inside resource folder,as if its coming from resources folder i need to change the height and width of the image $(".ZoomScrapbook1").click(function () { ImgName = this.name $.post("/Controls/ZoomTo.ashx?ImageName=" + ImgName + "&Add=1", {}, function (response) { alert(response); $('#Imgsrc').attr('src',
Can I show/hide inside a toggled img?
Hi, I'm just learning jquery because I'm building a site for a friend (in wordpress) and want to use some animation instead of loads of pages. What I want to achieve is essentially to show the outside of a building and when a user clicks on it it changes to a view of the inside. I've managed to get that far using code like this http://jsfiddle.net/M9QBb/91/ (once I figured out I needed to use the ready function as well - total newbie! ) The next step is though that once the inside of the building
date picker turns into a line
I am showing jquery datepicker in a modal window.when I click the textfield the date picker appears but immediately it turns into a line attached is the image. It used to work before , but not working now after upgrade of jquery to 1.7.1 it happens in IE 8. what could be causing this any advice? I cannot place the html as this is generated with ajax request.I am using jquery 1.7.1 and jQuery UI 1.7.1.
document.getElementById() alternative in jQuery
I have a flash floating banner. It has a X little button to stop floating, so the links from the other divs will be available. With this code down bellow I've managed to manipulate the overflow when clicking on the X button. It's working great, but from what I read document.getElementById works only with one ID and my idea now is to manipulate the floating banner with other blocks too. Let's say block2. Is any solution with jQuery for that? Some example on jsfiddle will be really helpful. <script
Can't catch (window).scroll
I can't catch the (window).scroll event, but I can catch the (window).resize event? Works: $(window).resize(function() { alert("Window Resized"); }); Doesn't Work: $(window).scroll(function() { alert("Window Scrolled"); }); I'm working on a SharePoint 2010 site and I'm sure that the problem is somewhere in the code that SP spits out, but I cannot figure out what would prevent (window).scroll from firing. What would cause this?
Dispaly error like span on some validation error in asp .net
I want to display a error message beside of the control which has the error on submit click
Return true from .submit causes existing async ajax calls to fail
I have a submit handler similar to the code shown below. The gist of it, is that when submit is clicked, I want to do "something" and then use the form's post to redirect the user to a "thank you" page. When I return true, the existing ajax call fails, and the redirect occurs as normal. When I return false, the ajax call succeeds, but the redirect doesn't happen. Can someone explain why? jQuery(document).ready( function($) { var request; $("#my-form-id").submit( function( event ) {
JQuery With ASP.NET Web Services
Hi Friends, I problem to calling web service method when call remotely not locally. I create asp.net web site . add a web service file(asmx) and create hello world method. Calling this method in page header and work fine. But when host this web service on iis and calling the web service in my project with url , my project not work. I search in google,stackoverflow and many other site but I can't find answer. you should call web service remotely not locally. Please give me a complete sample. Thanks
Upgrading from jQuery 1.5 to 1.0
Hi guys, for various reasons, I've been using jQuery 1.5 for a project, but it's become apparent that I need to upgrade to 1.10. Is there any way to audit code to see what's going to be broken by the upgrade?
Problem with load()
Hello all. I wrote small script, which check GET method values from URL and load content of proper file info div. function loadContent(content, language) //LOAD CONTENT INTO DIV (i.e. ordo_en.txt) { $('#content').load(content + '_' + language + '.txt', function() { alert(cont + '_' + lang + '.txt'); // alert as 'debbuger' info }); } function urlGet(name){ //GET VALUES FROM URL var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href); return results[1]
Using a function
Hello I have the following code: function animateTextTiles(){ $('article').hover(function(){ $('.description', this).stop().transition({marginTop:'60px'}, 150); }, function(){ $('.description', this).stop().transition({marginTop:'190px'}, 100); }); } and my plan was to put this $('.description', this).stop().transition({marginTop:'60px'}, 150); into a separate function with different parameters. But everything i wrote had the effects that it crashed or that every description was
Help keeping track of my variables
Hello, When a user login to my website his account is automatic displayed with column: name of sender, Time, Response. The last column:Response: have two buttons: accept and decline. If the user click accept a dialog box should come up. I want when I click accept in row 1 then the sender appears in the dialog box. and if click"accept" the second row a new dialog box appears with sender name that is associate with this row. result.php is where build table from my database. It is then display
Trouble with Simple Button Click Function
This seems to be pretty straight-forward, but I cannot get my functions to fire on button clicks. See the fiddle: http://jsfiddle.net/mMd6F/ I must be missing something simple...Thanks in advance. Brian
Help needed to capture form data in Jquery
Hi guys, have just starting using jquery and need some help with a form I have created. If someone can help me. In HTML (this is only a portion of the form) <td></td> <td>$<input type="text" class="amount" id="inc_rent_0" value=0 /></td> <td>$<input type="text" class="amount" id="inc_rent_1" value=0 /></td> <td>$<input type="text" class="amount" id="inc_rent_2" value=0 /></td> <td>$<input type="text" class="amount" id="inc_rent_3" value=0 /></td> <td>$<input type="text" class="amount" id="inc_rent_4"
after addClass to <button> an function doesnt work
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="css/basic.css"/> <script type="text/javascript" src="js/jquery-2.0.2.js"></script> <script type="text/javascript" src="js/basic.js"></script> </head> <body> <div id="start"> <button class="create"> New Form </button> </div> <div id="main"> </div> </body> </html> This is my HTML and this here my JS: $(document).ready(function() { var linecountername = 0; $('.create').on('click' , function(e) { $(this).hide(); linecountername =
Save data using jQuery
Currently m working on a dynamic project, facing two issues. 1.) How we can create and save an html file using jQuery . 2.) How we can fetch data from multiple html pages and save/append this data into a single html page at once.
How to detect user click on browser back button ?
Already I used hash change event.But it shows the alert on just change the url.I want one alert for browser back button onclick.
How to change browser backbutton functionality ?
I want to replace browser default backward button function with "new location".Using javascript. That means "New link"
I wrote a script,
I wrote a script, but I do not want them to see it, which means you can do Save page and see the code that I built Can encode the MAIN.JS
Some problem with de menu
i need some help with the menu i use the jquery.dcmegamenu on a page the page is www.autospin.es on change the page the menu is large to down. how to stop this? Thanks, amic.
How to block img tag source from loading?
How can I block IMG tag sources from loading? Im using the button UI to load buttons instead of images. But the images do appear, then on document.ready get zapped. I can block them with jquery, but Im trying to block the images from flickering. i wish jquery had a beforedocument.ready function for just such actions
Start & Stop JQuery Animation
<!DOCTYPE html> <html> <head> <style> div { position: relative; background-color: #abc; width: 40px; height: 40px; float: left; margin: 5px; } </style> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> </head> <body> <p><button id="go">Run »</button></p> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <script> $( "#go" ).click(function(){ $( ".block:first" ).animate({ top: 100
Menu with easing effect
Hello, i want to make a similar menu of the following tutorial : http://www.webstuffshare.com/2012/03/auto-moving-submenu-using-jquery/ My menu is here : www.intergayhiv.com I would like that when your mouse is over, an image appears. Each button has its own image. However my menu shows always the same image (of the first button) at all buttons hover, it does not link the images to their submenus... I use WordPress, i installed the html codes together with the two scripts in the header body : <div
How to do selector
Hello, Im trying to select only "a" tags that have a "img" child. How would I do this? Thank You
problem with width() and space between words
Here is my code (copied from some kind soul somewhere on the internet -- this is part of a function to loop through child elements to get maximum width): var html_org = $(this).html(); var html_calc = '<span>' + $(this).text() + '</span>'; $(this).html(html_calc); var w = $(this).find('span:first').innerWidth(); $(this).html(html_org); where $(this) is the label element for: <input type="radio" id="radio5" name="radio" value="MembersPayments"/><label for="radio5">Members Payments</label>
animate JQuery
Hello I am utilizing this: <!DOCTYPE html> <html> <head> <style> div { background-color:#bca; width:200px; height:1.1em; text-align:center; border:2px solid green; margin:3px; font-size:14px; } button { font-size:14px; } </style> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <style>html, body { border:0; margin:0; padding:0; }body { font-family: 'Helvetica', 'Arial', 'Verdana', 'sans-serif'; }</style></head> <body> <button id="go1">» Animate Block1</button>
jQuery problems in chrome
Hey, i have one problem, but just in chrome. Ok, i have this in html: <a href='javascript:;' class='album' onclick='displayGallery($idArray[$i]);' id='albumid-$i' onmouseover='albumPreview($i);return true' onMouseOut='albumPreviewStop($i)>some images here</a> And this functions: var time; function albumPreview(id) { $("#albumid-" + id + " > div:gt(0)").hide(); time = setInterval(function() { $("#albumid-" + id + " > div:first") .hide() .next()
Browser extension loading its own version of jQuery and breaking the jQuery based websites
We are developing a website in which we are making use of JQuery library and some of JQuery plugins like cycle, countdown, jcarousal and so on. Recently we found that if our website users download and install browser plugin/extension called "Pricepeep"; then they keep getting lots of javascript errors while browsing our website pages. If they go to Browser's tools option and disable this extension then again everything works good and no javascript error occurs while opening the web pages. In browser's
Preloader: How to make an element change style during preload
Hello everybody, so I got my preloader working and counting up until 100%. My full preloader.js can be found here: http://mc-communicate.com/preloader.js I call the preloader on my front-page.js: var _pContainer = $('<div id="coll-preloader"></div>') var _pPercent = $('<div class="percent">0</div>') var _pbgwhite = $('<div class="bgwhite"></div>') var _pbred = $('<div class="bgred"></div>') if (!$('.lt-ie9').length) { _pContainer.append(_pPercent, _pbgwhite, _pbred); $('body.home').append(_pContainer);
Rotated Video player in Chrome, bugs.
Hi, Can anybody help with playing rotated video in Chrome? I put video at YouTube that show problem http://www.youtube.com/watch?v=IZGkXkPKaI4 Rotating images works super, but there are bugs when displaying rotated video. Sample page: http://msdrop.com/?i=2 Thanks Piotr *** Read about msDrop at jQuery Forum
Video autoplay inside article slider, when video clip is visible?
Hi, I have an article slider, which contains articles with HTML5 video clips inside. I would like to achieve that each video clip would play when visible. I have this class active when an article becomes visible: .nspArtPage.active { opacity: 1; and this when invisible: .nspArtPage.active { opacity: 0; I thought maybe I could tie the auto play event to the clip's position or visibility. I would appreciate if someone would share his thoughts with me on this. Thanks!
Next Page