Search Results

Search found 23820 results on 953 pages for 'jquery ui autocomplete'.

Page 127/953 | < Previous Page | 123 124 125 126 127 128 129 130 131 132 133 134  | Next Page >

  • What's wrong with this jQuery example?

    - by Sven Larson
    The following jQuery example should put some text into the div, but it doesn't. I tried Firefox, Google Chrome and Internet Explorer. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" language="javascript"></script> <script language="javascript"> $(window).load(function() { $('adiv').html('<p>hello world</p>'); alert('done'); }); </script> </head> <body> <div id="adiv"> </div> </body> </html> Sorry, this might be stupid, but I'm stuck.

    Read the article

  • Speeding up jQuery empty() or replaceWith() Functions When Dealing with Large DOM Elements

    - by Levi Hackwith
    Let me start off by apologizing for not giving a code snippet. The project I'm working on is proprietary and I'm afraid I can't show exactly what I'm working on. However, I'll do my best to be descriptive. Here's a breakdown of what goes on in my application: User clicks a button Server retrieves a list of images in the form of a data-table Each row in the table contains 8 data-cells that in turn each contain one hyperlink Each request by the user can contain up to 50 rows (I can change this number if need be) That means the table contains upwards of 800 individual DOM elements My analysis shows that jQuery("#dataTable").empty() and jQuery("#dataTable).replaceWith(tableCloneObject) take up 97% of my overall processing time and take on average 4 - 6 seconds to complete. I'm looking for a way to speed up either of the above mentioned jQuery functions when dealing with massive DOM elements that need to be removed / replaced. I hope my explanation helps.

    Read the article

  • .getScript getting the redirect url of javascript

    - by user177883
    I d like to execute a remote javascript which redirects the user to another page on my domain with data that s passes as query string. I want to get this data which is passed on to the page on my domain. $.getScript('http://site.com/foo.js', function() { //foo.js redirects to another page on my domain with data // and i d like to capture that data from this function, // at least if i find the parameters that passed on there, i ll be fine. }); What to do ? http://api.jquery.com/jQuery.getScript/

    Read the article

  • ASP.NET Ajax partial postback and jQuery problem

    - by chromaloop
    A control contains some HTML and some jQuery to handle a fancy tooltip to display when you click an image within a div. The control is then used on several different pages, sometimes within an updatePanel, sometimes not. I have the following code to handle loading the jQuery after a partial postback when the control is displayed within an update panel. Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); function EndRequestHandler(sender, args) { $('img.ormdShipping').each(function(){ $(this).qtip({ // some qtip options go here }) }); } Problem is, the jQuery doesn't load when the control is used anywhere other than an updatePanel. Do I need a second function that's triggered outside of the EndRequestHandler?

    Read the article

  • ajax/jquery disables links after submit

    - by Chocho
    i am working on this form. i am using lightbox and dhtml fade effects. the content in my lightbox is a form. i am using jquery to validate the form. once the form is submitted, i redirect a user back to a thank you page. what i am noticing is that, once all the above events has taken place, i cannot click anywhere on my screen, all the links/buttons are sort of disable. i need to press F5 to refresh the page to be able to click anywhere on the page again? is this happening because i am using jquery validation and an events already took place, how do i resolve this as i am a newbie to jquery. thanks

    Read the article

  • Change background colour of individual elements on the fly

    - by John
    Hi, Is there a way in CSS or JQuery where I can dynamically change the background of li tags so they get slightly lighter for each element until it gets to white. For example say I had a list of 10 li elements. The first would have a red (#ff0000) background, the next one would then be a lighter shade of red, and so on and so on until we got to the last one which would have a background of white (#FFFFFF) The list can be any length and i just want the background colour to go from one colour e.g. red to another colour e.g. white. My site uses JQuery so if I have to use that I don't mind. Thanks

    Read the article

  • Using jQuery's animate(), if the clicked on element is "<a href="#" ...> </a>", the fucntion should

    - by Jian Lin
    I was reading jQuery's page for animate() http://api.jquery.com/animate/ Its examples don't mention about if using <a href="#" id="clickme">click me</a> ... $('#clickme').click(function() { $('#someDiv').animate({left: "+=60"}); }) we actually still have to return false like in the old days? $('#clickme').click(function() { $('#someDiv').animate({left: "+=60"}); return false; }) (but then, those examples didn't use a <a> for the "click me"... but used something else. Otherwise the page will jump back to the beginning of the page? Does jQuery have a more elegant or magical way of doing it?

    Read the article

  • difference between :first and :first-child not clear

    - by sushil bharwani
    i am having a ul li list <ul> <li>Parent <ul> <li> child1 </li> <li> child2 </li> </ul> </li> </ul> and i am trying to use a selector jQuery('ul li:first') and jQuery('ul li:first-child') both giving the same result this makes me confused about the difference between the two is there a example which clarifies the difference between two selectors

    Read the article

  • jQuery Validation 1.10 and MVC server-side errors

    - by sam360
    This feature used to work just fine on my website. If I added a custom error to ModelState, the input on the page would be marked as "input-validation-error" and the Html.ValidationMessage() would take care of rendering a span with the error message inside it. Due to incompatibility reasons we had to upgrade our jQuery Validation to 1.10: Now when I add a custom error to ModelState, I can debug and see that the HTML elements being rendered correctly, but as soon as the page load is completed, jQuery Validation removes the error message and set the "class" attribute of the input to "valid"! Has any one else come across this issue? UPDATE Testing further shows that the error message is shown on the screen until the field gains focus. As soon as the field gains focus jQuery Validation removes the customer server-side error message and marks the field as good.

    Read the article

  • Conversion of DOM element selection code to jQuery

    - by Tom McDonnell
    I have a large Javascript codebase to convert to jQuery. The code is structured such that DOM elements are created in Javascript (using a library called DomBuilder), and saved to variables if they will be needed later, before being added to the DOM. Eg. var inputs = { submitConfirm: INPUT({type: 'button', value: 'Submit'}), submitCancel : INPUT({type: 'button', value: 'Cancel'}) }; document.appendChild(inputs.submitConfirm); Then later for example... inputs.submitCancel.style.display = 'none'; inputs.submitCancel.addEventListener('click', onClickSubmitCancel, false); My problem is that jQuery seems to lack a way of manipulating DOM elements directly, as opposed to selecting them first (with for example $('#submitCancel'). Can anyone suggest a way to directly translate the last two Javascript lines given above to use jQuery, given that the DOM elements are already available, and so do not need to be selected?

    Read the article

  • jQuery featured content slider

    - by azz0r
    Hello, I have a content area that loops through divs and shows there content. I'm having trouble making it display the initial content, unfortunately it waits 5000 milliseconds before triggering the very first content area to display. Anyone spot an easy way to make it display the initial area, then slide to the next area and do them at 5000 milliseconds. JS Model.FeatureBar = { current:0, items:{}, init: function init(options){ var me = this; me.triggers = [] me.slides = [] this.container = jQuery('#features'); jQuery('.feature').each(function(i){ me.triggers[i] = {url: jQuery(this).children('.feature-title a').href, title: jQuery(this).children('.feature-title'),description:jQuery(this).children('.feature-description')} me.slides[i] = {image: jQuery(this).children('.feature-image')} }); for(var i in this.slides){ this.slides[i].image.hide(); this.triggers[i].description.hide(); } setInterval(function(){Model.FeatureBar.next()},5000); }, next: function next(){ var i = (this.current+1 < this.triggers.length) ? this.current+1 : 0; this.goToItem(i); }, previous: function previous(){ var i = (this.current-1 > 1) ? this.current-1 : this.triggers.length; this.goToItem(i); }, goToItem: function goToItem(i){ if(!this.slides[i]) throw 'Slide out of range'; this.triggers[this.current].description.slideUp(); this.triggers[i].description.slideDown(); this.slides[this.current].image.hide(); this.slides[i].image.show(); this.current = i; }, } html <div id="features"> <div class="feature current"> <div class="movie-cover"> <a href="/police/movie"><img title="" alt="" src="/design/images/four-oh-four.png"></a> </div> <div class="feature-image" style="display: none;"> <img src="/design/images/four-oh-four.png"> </div> <h2 class="feature-title"><a href="/police/movie">Police</a></h2> <p class="feature-description" style="overflow: hidden; display: block; height: 50.8604px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px;">DESCRIPTION</p> </div> <div class="feature"> <div class="movie-cover"> <a href="/rude/movie"><img title="" alt="" src="/design/images/four-oh-four.png"></a> </div> <div class="feature-image" style="display: none;"> <img src="/design/images/four-oh-four.png"> </div> <h2 class="feature-title"><a href="/rude/movie">Rude</a></h2> <p class="feature-description" style="overflow: hidden; display: block; height: 18.3475px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px;">DESCRIPTION</p> </div> <div class="feature"> <div class="movie-cover"> <a href="/brits/movie"><img title="" alt="" src="/design/images/four-oh-four.png"></a> </div> <div class="feature-image" style="display: block;"> <img src="/design/images/four-oh-four.png"> </div> <h2 class="feature-title"><a href="/brits/movie">Brits</a></h2> <p class="feature-description" style="overflow: hidden; display: block; height: 40.1549px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px;">DESCRIPTION</p> </div> <div class="feature"> <div class="movie-cover"> <a href="/indie/movie"><img title="" alt="" src="/design/images/four-oh-four.png"></a> </div> <div class="feature-image" style="display: none;"> <img src="/design/images/four-oh-four.png"> </div> <h2 class="feature-title"><a href="/indie/movie">Indie</a></h2> <p class="feature-description" style="overflow: hidden; display: block; height: 42.4247px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px;">DESCRIPTION</p> </div>

    Read the article

  • jQuery Optimizations

    - by aepheus
    I've just come to the end of a large development project. We were on a tight timeline, so a lot of optimization was "deferred". Now that we met our deadline, we're going back and trying to optimize things. My questions is this: What are some of the most important things you look for when optimizing jQuery web sites. Alternately I'd love to hear of sites/lists that have particularly good advise for optimizing jQuery. I've already read a few articles, http://www.tvidesign.co.uk/blog/improve-your-jquery-25-excellent-tips.aspx was an especially good read.

    Read the article

  • Official way to ask jQuery wait for all images to load before executing something

    - by Simon_Weaver
    In jQuery when you do this: $(function() { alert("DOM is loaded, but images not necessarily all loaded"); }); It waits for the DOM to load and executes your code. If all the images are not loaded then it still executes the code. This is obviously what we want if we're initializing any DOM stuff such as showing or hiding elements or attaching events. Let's say though that I want some animation and I don't want it running until all the images are loaded. Is there an official way in jQuery to do this? The best way I have is to use <body onload="finished()">, but I don't really want to do that unless I have to. Note: There is a bug in jQuery 1.3.1 in Internet Explorer which actually does wait for all images to load before executing code inside $function() { }. So if you're using that platform you'll get the behavior I'm looking for instead of the correct behavior described above.

    Read the article

  • Page loading effect with jquery

    - by Andy Simpson
    Hello all, Is there a way to use jquery (or other method) to display a loading div while page loads? I have a table that is populated using PHP/MySQL and can contain several thousand rows. This is then sorted using the tablesorter plugin for jquery. Everything works fine, however the page can sometimes take 4-5 seconds to fully load and it would be nice to display a 'loading...' message within a div which automatically disappears when whole table is loaded. I have heard of loadmask plugin for jquery - would this be suitable for my needs and if not any alternative? No AJAX calls are being made while loading this table if thats relevant. Thanks in advance Andy

    Read the article

  • Help porting a bit of Prototype JavaScript to jQuery

    - by ewall
    I have already implemented some AJAX pagination in my Rails app by using the example code for the will_paginate plugin--which is apparently using Prototype. But if I wanted to switch to using jQuery for future additions, I really don't want to have the Prototype stuff sitting around too (yes, I know it's possible). I haven't written a lick of JavaScript in years, let alone looked into Prototype and jQuery... so I could use some help converting this bit into jQuery-compatible syntax: document.observe("dom:loaded", function() { // the element in which we will observe all clicks and capture // ones originating from pagination links var container = $(document.body) if (container) { var img = new Image img.src = '/images/spinner.gif' function createSpinner() { return new Element('img', { src: img.src, 'class': 'spinner' }) } container.observe('click', function(e) { var el = e.element() if (el.match('.pagination a')) { el.up('.pagination').insert(createSpinner()) new Ajax.Request(el.href, { method: 'get' }) e.stop() } }) } }) Thanks in advance!

    Read the article

  • Changing Jquery Calendar size using google hosted theme

    - by Ali
    I am trying to implement the Jquery datepicker using a google hosted theme. But the Calendar is too big. Can I make it a smaller version by altering the function itself seeing I cant change the theme? <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/start/jquery-ui.css" type="text/css" media="all" /> <script type="text/javascript" src="jquery.js"></script> $(function() { $("#datepicker").datepicker({ dateFormat: $.datepicker.W3C}); }); Thanks

    Read the article

  • Get the entire string of a jquery DOM object

    - by Scozzard
    Hi, I have had a bit of a look around and am having some difficulty solving a wee issue I am having. I basically have a string of HTML, I convert that to a JQuery DOM object so that I can easily remove all elements that have a certain class using JQuery's .remove(). I.e., var radHtml = editor.get_html(); var jqDom = $(radHtml); $(".thickbox", jqDom).remove(); editor.set_html(jqDom.html()); The only problem is that .html() only gets the first element, not the entire DOM. In reference to my code I am basically wanting radHhtml - elements with class "thickbox" (returned as string). I was wondering if there was an easy way to do this - have some html and remove all elements (in this case divs) that have a certain class (but leaving their contents). JQuery doesnt have to used, but I would like to. Any help would be much appreicated. Thanks.

    Read the article

  • Making a table in a scrolling div resizable?

    - by Mason Jones
    I've got a table in a div, with a vertical scrollbar on the div to allow the table to be longer than the div can hold. Works fine. But I'd like to allow the user to resize the div vertically if they want to be able to view more of the table. I've been playing with the jQueryUI resizable interaction, but it doesn't seem to quite do what I want; at least, not so far. I've tried making the wrapper div resizable, but the behavior's erratic. If I have the style "height:20em; overflow:auto;" on it, then I can resize the table horizontally, but not vertically. If I remove the overflow, then the table flows outside the div of course. If I remove the height, then the table is actually resizable, but it is initially drawn at full height. Anyone know of a way to specify an initial height, but allow it to be resized larger than that? If I make the table resizable rather than the div, then I can resize the table horizontally within the div but I can't increase the height of the displayed table. Which makes sense, of course, but I thought I'd mention it. Also, is there a way to make the resize "handle" the corner between the horizontal and vertical scrollbars? Right now it's a sort of invisible handle in the bottom-right of the table. Thanks for any thoughts.

    Read the article

  • How can I call some javascript functions but, waiting for the previous has finished?

    - by texai
    I want to call some functions but waiting for the previous one has finished. I know jQuery provides a callback argument in several functions, but I want to learn how implement this behaviour in my own jQuery plugin. So this is the case: After read answers from my previous question I wrote this: (function(callback){ $('#art1').animate({'width':'1000px'},1000); callback(); })((function(callback2){ $('#art2').animate({'width':'1000px'},1000); callback2(); })(function(){ $('#art3').animate({'width':'1000px'},1000); })); But still not working. Three animates still starting at same time. I want they were called one after other. But without using: $('#art1').animate({'width':'1000px'},1000,'linear',function(){ $('#art2').animate({'width':'1000px'},1000,'linear',function(){ $('#art3').animate({'width':'1000px'},1000); }); });

    Read the article

  • Jquery CPU usage

    - by nharry
    I am using Jquery to make an image scroll across my page horizontally. The only problem is that it uses a serious amount of cpu usage. Up to 100% on a single core laptop in firefox. What could cause this??? Jquery <script> jQuery(document).ready(function() { $(".speech").animate({backgroundPosition: "-6000px 0px"}, 400000, null); }); </script> CSS .speech { /*position:fixed;*/ top:0; left:0px; height:400px; width:100%; z-index:-1; background:url(/images/speech.png) -300px -500px repeat-x; margin-right: auto; margin-left: auto; position: fixed; } HTML <div class="speech"></div>

    Read the article

  • JQuery with SMARTY php

    - by out_sider
    This might seem a very noob question but I haven't found the answer yet. I have a header.tpl file which contains xhtml code. I want to and some java script to it using jquery. But my problem is that it simple doesn't happen what I tell it to do. Because the page hoster comiples php with SMARTY I had to make a small change to the block script, which was had the {literal} {/literal}. But the rest seems ok. Btw the jquery.js is on the same folder as the header.tpl. File header.tpl http://feupload.fe.up.pt/get/SQWJvybQkDCmjEG PS: I event replaced all the code by the getstarted tutorial on the jquery homepage and added the {literlar} {/literal} (otherwise it would give an error) and it steel didn't work

    Read the article

  • Getting ID of a cloned element

    - by Haris
    I'm using jQuery draggable and droppable. I'm cloning the draggable widget on drop event of droppable. I want to fetch the ID of the cloned element which will be sent to the the application with the AJAX request. I'm unable to fetch the ID. console.log returns blank string. var dropElem = ui.draggable.html(); var clone = $(dropElem).clone(); var widgetType = $(clone).attr('id'); $(this).append(clone); Also, I want to change the ID of the cloned element on the response event of the ajax request. How do I specially change the ID of the cloned event after it has been appended?

    Read the article

  • Best PHP framework for jQuery?

    - by Radagaisus
    I've read all the answers on stackoverflow for similar questions but no one really laid down an explanation: why is zend/symfony/kohana/cakePHP the best for jQuery? what is the difference? I'm writing a snazzy ultra-cool web 2.0 app with google maps and facebook connect integration plus a bunch of other APIs. Almost everything will be AJAX vis JSON. For me PHP is a burden, an unnecessary evil. I need database control, almost always via JSON. I need user authentication. This is all. Nothing fancy. And I need it to scale. Most of all I need it to work effortlessly with jQuery, I need it to be jQuery's BFF, and I need to know why it is so. Thank you very much EDIT: The candidates right now are Yii, CodeIgniter and MongoDB.

    Read the article

  • jQuery object are immutable?

    - by Daniel
    Hello a new noob on jQuery here and I was wondering if jQuery objects are immutable. For example: var obj1 = $("<tag></tag>"); var obj2 = obj1.append("something"); Will obj1 and obj2 be the same meaning obj2 will reference obj1? UPDATE: The above example kind of scratches the surface of what i want to know, a more accurate question is : If i chain function from the jQuery api will they return the same object or a new one (as the case with strings in Java)?

    Read the article

  • jQuery - After number of elements add html!

    - by Florescu Adrian
    Hello. I need to know if I can count the elements inside a div and after 3 elements to add an html object. <div id="wrapper"> <a href="#">1</a> <a href="#">1</a> <a href="#">1</a> //insert html with jQuery here <a href="#">1</a> <a href="#">1</a> <a href="#">1</a> //insert html with jQuery here <a href="#">1</a> <a href="#">1</a> <a href="#">1</a> //insert html with jQuery here </div>

    Read the article

< Previous Page | 123 124 125 126 127 128 129 130 131 132 133 134  | Next Page >