Inside timout function .is selector isnt working
Hi. After placing my code inside a timeout function, the script is not recognising the .is selector. I need one part of the code to be rendered if the item has the class .grid_1 or .grid_2, if not use the other code. This worked fine before placing it inside the timeout function. Does anyone have any idea what is breaking the code? $(function() { var timeoutID = 0; $('ul#grid li').mouseenter(function() { var preview_path= '/index.php/includes/embed_grid_id/'+$(this).attr("id");
jQuery.data caching of 'data-*' attributes
I could be off-base here, but from what I've gathered looking at jQuery's data method, I am very surprised with how it caches data attributes. Here is the gist that summarizes it: https://gist.github.com/3298929 In essence, if you are setting 'data-something' attributes on elements, you cannot rely on $.data('something') to retrieve the current value. jQuery caches the attribute value in its internal data store, and since jQuery prefers internally stored data over element data attributes, subsequent
Timeline of actions
hi friends, I want a timeline of action with 3 action: fade-in, delay, fade-out. In summarize the total timeline is: 5000 ms delay on picture 1 1000 ms fadeout on picture 1 (start action in 5000 ms of timline) 1000 ms fadein on picture 2 (start action in 6000 ms of timline) 5000 ms delay on picture 2 (start action in 7000 ms of timline) 1000 ms fadeout on picture 2 (start action in 12000 ms of timline) 1000 ms fadein on picture 3 (start action in 13000 ms of timline) 5000 ms delay on picture 3 (start
dropdown check list
Hi All, I am using 'defer parsing of js ' for dropdown list. But it is not working when clearing the cache, Here is the code: <select name="deptT" id="deptT" multiple="multiple" class="filterSelect" style="width:85%;"> <option>1111</option> <option>2222</option> <option>3333</option> </select> <script type="text/javascript"> var $jj; function downloadJSAtOnload() { element4 = document.createElement("script"); element4.src = "js/jquery.js"; document.body.appendChild(element4);
Tabs in IE cascade and show bullets
I know there has been a lot of problems with tabs in IE, but I can't seem to find a fix based on what I've searched on. It obviously works fine in other browsers, but in IE the tabs cascade down instead of displaying side by side and the bullets are shown to the right in a jumbled up fashion. I can't seem to figure out why. <script type="text/javascript"> jQuery(document).ready(function() { jQuery('.tabs a').click(function(){ switch_tabs(jQuery(this));
[jQuery] "Add to bookmarks" plugin ?
Hello, I need to add a script for bookmarking a page. Is there jQuery plugin for doing this ? If not is there a simple way of doing this with the jQuery sintax ? Thanks for your help Pierre
jQuery Not working
Hi, Recently I'm using a AllRounder Joomla 2.5 Template. But the Template Not viewing Properly. Most of the Feature Not viewing. Plz help. I'm novice to joomla and jQuery. Akram
Find URL and check segments
Hi. I am trying to get jQuery to find the current URL, and then use conditions to load a different variable depending on it. For instance, if the first segment after the URL is empty, show this... if the first URL is equal to then show this. www.domain.com/segment_1/segment_2 etc. I have managed to get this to partically work using the following. But it only works for the first condition, not the second. Can anyone point me in a better direction, or show me what I am doing wrong? var
Trying to add a simple 'mousewheel' zoom for this image viewer....
Hello, I am having a difficult time trying to integrate this - but I am just trying to add a simple 'zoom' feature that allows people to zoom in / out of the large picture on the slideshow using the mousewheel on their mouse. Here is the image viewer I am talking about: http://sneakylink.com/k Any help would be greatly appreciated, Thanks J
[jQuery] DELETE HTTP method
Can somebody show example how to send via AJAX DELETE HTTP method instead of POST, like this: $.post( '/filial/del/', {city:$.trim(city)} ); but DELETE. I tried: $.ajax( {url:'/filial/del/', type:'DELETE', data:'city='+encodeURI($.trim(city))} ); and: $.ajax( {url:'/filial/del/', dataType:'json', type:'DELETE', data: {'city':$.trim(city)}} ); but in django vie see that no any 'city' in POST or GET! Is this possible? I don't see any DELETE in jQuery source...
Shadow clipping
I'm trying to squash some text shadow clipping. I have a script that separates each letter (Lettering plugin) to split up each letter and then using hoverwords plugin along with jQuery Easing to do the animation. At the end of js you can see my attempt at shadow clipping. Right now an example problem letter is the 't' after you mouseover the first word and then mouseout and then the first word will come back and you will see the 't' shadow clipped. Here's a jsfiddle so you can see it in action.
how to show and hide each class "mytext" when mouseover and out each "myimg"
<div class="myimg"> <img src="image1.jpg" /> <div class="mytext">text 1</div></div> <div class="myimg"> <img src="image2.jpg" /> <div class="mytext">text 1</div></div> <div class="myimg"> <img src="image3.jpg" /> <div class="mytext">text 1</div></div> <div class="myimg"> <img src="image4.jpg" /> <div class="mytext">text 1</div></div> <div class="myimg"> <img src="image5.jpg" /> <div class="mytext">text 1</div></div> Thanks :D
Is replacing/proxying jQuery functions a bad idea?
Is there any reason for not doing something like this: (function() { var original=jQuery.fn.FUNCTION_TO_REPLACE; jQuery.fn.FUNCTION_TO_REPLACE=function() { var args=arguments; // Change some args return original.apply(this, args); }; }()); I already tried somthing like this to globally change the speed of all jQuery animations and it seems to work very well... https://forum.jquery.com/topic/globally-speed-up-slow-down-animations (Maybe I choose the wrong forum for this question
Darg and drop to map the items between 2 columns.
Hi, I am new to JQuery and have requirement where, I have to map the items in Column A with Column B Column A Column B 1 ii 2 i 3 v 4 iii 5 iv When "1" is dragged from "Column A" and dropped at "i" in "Column B", a line should be drawn from "1" to "i" to indicate a mapping between the two. Can anyone guide me how it can be achieved in JQuery. Thanks In Advance, Tara
jquery $.ajax() issues and concerns
Hi, I am using this $.ajax() to the data from webservice(.asmx) . webservice sends me data in html format enclosed as strings.I am just appending the received conten to table.It also contain image tags containing images. When i browse this page in chrome. Sometime these images are not loading one by one. Its gets loaded once all page async calls have done. When i browse this page in IE. Browse gets freeze can't do other process. this is happening even though i have set async: true during ajax call.
jquery event handler inside updatepanel not working
I have drop downlist inside upadate panel. My jquery change function not working. could you explain why $(document).ready(function () { $("#ddlRateStructure").change(function () { alert("It worked!"); }); }) ... <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> .... <div class="td"> <asp:DropDownList runat="server" ID="ddlRateStructure" ClientIDMode="Static" > </asp:DropDownList> </div> .... </ContentTemplate> </asp:UpdatePanel >
jquery.ajax jsonp question
I am trying to make a jsonp call to bing map geocode service. depending on what parameters i change, i either get a cross-domain error or return is not script type. however, appending a script tag to do the call without jquery works, so i believe it's an issue with the parameters i'm configuring, i just can't figure out which one. in the case without jquery, i have to append the callback myself as &jsonp=mycallback. in the case of jquery, i let jquery.ajax append it for me. bingURL = 'https://dev.virtualearth.net/REST/v1/Locations?jsonp=mycallback&countryRegion='+encodeURI(country)+'&adminDistrict='+encodeURI(state_prov)+'&locality='+encodeURI(city)+'&postalCode='+encodeURI(postal_code)+'&addressLine='+encodeURI(addr_line_1)+'&includeNeighborhood=0&maxResults=1&key='+this.BING_KEY+'&output=json';
Why do i need the anonymous functions if i am sure $ alisa is used for jQuery?
Hello, i am new to jQuery and i have seen some this practice in writing classes by jquery: (function ($, app) { app.Method = function () { ... } })(jQuery, this.app = this.app || {}); i understand this anonymous function, and i understand the problem of $ alias. my question is this: if i am sure that $ is used for only jQuery in website, why do i need this practice anymore?
Error: jQuery171044046986018069634_1344411426301 was not called - while doing ajax call
Hi, I am using the following ajax call to perform login, $( "#loginform" ).validVal(); $( "#loginform" ).submit(function( event ) { event.preventDefault(); var form_data = $( "#loginform" ).triggerHandler( "submitForm" ); if ( form_data ) { $.ajax({ type: "POST", url: serviceURL+'login.php?', data: form_data, dataType: 'jsonp', async: false, success:
Using a select box to retrieve values from the database and to save the result in an another select box
Hi, I have two select boxes: one is country and the other one is cities. When the user selects a country, the appropriate cities for that country should be populated in the "cities" from the database. I am new to jquery and javascript and i am not sure how to implement this. It will be appreciated if someone gives me a sample code for performing this functionality. I am using this in one of my forms in django framework which is implemented in python. Thank you in advance <!DOCTYPE html> <html>
issue with jquery client getting jsonp data from restfull webservice
how to send the response to jquery client as josn data. this is my jquery code for getting data to client var url= 'http://10.163.14.56:9000/customerservice/renderdetails?callback=?'; $(document).ready(function(){ $('#getData').click(function() { $.ajax({ type: 'GET', url: url, async: false, crossDomain:true,
jquery and html fragments with script tags
I use jquery.load to download some html and embed it to the page. I have noticed rather then adding the script tags jquery executes them. Why does jquery remove the script tags and execute them as opposed to adding them to the DOm and letting the browser run them? The problem I am having is that those script tags are referenced via relative links that do not resolve properly on the page I download the html. I was hoping I could process the links and update the references before they were executed.
No conversion from script to jsonp (chrome, safari & fireworks)
From localhost I call a rest service (php) via cross domain using jsonp, it works on Internet Explorer but I got error on Chrome (21.0.1180.60), Safari and Firefox. Any idea or help is welcome. Here is the code: $.ajax({ type: "GET", url: urlroot, data: {}, dataType: "jsonp", success: function(resp){ alert("mserver says: "+resp.message); }, error: function(e, textStatus, errorThrown){ alert('Error: '+errorThrown ); } }); Please tell me what's wrong
Shorten function + css. Please (tool tip)
Shorten function + css. Please View efect: http://jsfiddle.net/biofusionart/4esNj/12/ HTML: Copy code <a class="provincia" href ="#">Provincia</a> <a class="provincia2" href ="#">Provincia</a> <span class="provincia">▼</span> <span class="provincia2">▼</span> <div class="provincia"> <span class="tip">Elige provincia</span> <ol> <li> <div class="cont_scroll tipo_provinc menu_holder_scroll"> <div class="seleccion_provincias"></div>
Creating link from TD contents
Hi, I am trying to create hyperlinks based on contents of a table. I successfully manage to identify the right columns; but I don't manage to create a hyperlink that includes the columns value. Imagine the column contains in the first row the text ABC=1, in the next row it might contain the text ABC=21. Now I want to create a hyperlink www.somewebsite.com?ABC=1 and for the next row www.somewebsite.com?ABC=21 So far I have : $("TD:contains('ABC=1').ms-vb2").addClass('ab_attach') to identify the
Caching problem?
Hi everyone, I'm using load() to run&display the output of a PHP script reading the last five entries of a database. Now there is also a "Show all" link to show more than just five. Especially the first time, this seems to work well. But after that, I get weird behavior: The "Loading..." text appears (see code below), then it displays the last five results and after a few more seconds it finally also displays all the other results. After a couple more seconds, however, it just goes back to only displaying
how to push array into json object with jquery
Hi, I have array's of data which as below each depicting an row with key and value i.e columns in the row: { "CompanyName": "Alfreds Futterkiste", "ContactName": "Maria Anders", "ContactTitle": "Sales Representative", "Address": "Obere Str. 57", "City": "Berlin", "Country": "Germany" } --> Array1 { "CompanyName": "Ana Trujillo Emparedados y helados", "ContactName": "Ana Trujillo", "ContactTitle": "Owner", "Address": "Avda. de la Constitucin 2222", "City": "Mxico D.F.", "Country": "Mexico"
Re Clicking Drop Down after Ajax Div Update doesn't work
I am attempting to have a form section updated with the response from a java servlet. Essentially making a selection in the first drop down should update the div to show a second drop down list. It works the first time but does not work after that, or it doesn't appear to be working after that. <code> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <! DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
How to change the text for a link after being pressed
I'm trying to add a very simple show/hide link to my gallery. The code I have so far will toggle the visibility of the div correctly when the link is pressed, but I want that text to change to reflect what would happen when pressed again (so it'll display 'show' when the div is hidden, and 'hide' when the div is showing). jQuery: $('.toggleLandscapes').click(function(){ $("#landscape_thumbs").slideToggle(); $(".toggleLandscapes").html((".toggleLandscapes:contains('Hide')") ? "Show" : "Hide"); The
live functionality with on?
live is deprecated and the docs point to on. but live attached the event handler now and in the future. does on do the same thing. i thought it behaved like bind. if on does behave like bind, and not live, is there a way to get on to behave like live?
Collapsing and expanding sections
Hi, Basically I want to collapse and expand sections in the table. The demo is in I have no idea so far. But I found some useful code at here. It seems that the code is incomplete and I don't understand it at all. I made an example at http://jsfiddle.net/8Ma77/ What I missed in the code and is there a similar example? Thanks.
JQuery - two overlaping/colliding Scripts
I just started to redesign my Portfolio an found a tiny annoying bug: Please have a look athttp://hire.pixelpizza.de/ and click on "ok, lets see the goods". after that, you will have a page with a blue background and there you have to click on "see more pictures of the west". now you have opened up a fancybox Gallery. The problem is, now the two Scripts for the Page Switch and for the Fancybox are coliding and overlaping each other if you press the right arrow button on your keyboard and thats not
Not working
Hi, friends i m developing a website and i m using 3 jquery 1 for menu 2nd for background image scroll and 3rd for the banner changing. Before i have using slideshow menu and background image working properly but when i used banner changing slide show it stops my background image changing jquery and very slow performance in ie7 - Pls help me out <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Full Page Background Image | CSS #1</title> <!-- #######################################
jquery version conflict
Hi All, I am working on an application which uses 1.3.2 version of jquery.js, 1.7.2 version of jquery-ui-min.js, diff version of jquery tools and plugins which are working fine together. Now I want to install a javascript plugin which uses 1.7 version of jquery.min.js. The issue is version conflict. When I use jquery.noConflict(), UI, tools and plugins stop working. Please help. Cheers, Swapnil
regarding jquery with restfull service
i am getting the following error in alert from client when fetch the data from server error[object Object] and browser Timestamp: 08/07/2012 05:27:07 PM Error: SyntaxError: invalid label Source File: http://10.163.14.56:9000/customerservice/renderdetails?callback=jsonCallback&_=1344340627467 Line: 1, Column: 1 Source Code: {"age":100,"name":"mkyong.com",} <script src="jquery-1.7.1.min.js"></script> <script> //var url= "http://10.163.14.56:9000/customerservice/getDet?callback=?";
Why do I get readyState = 0 using $.ajax to call my web service ?
I'm attempting to call a pre-existing web service using JQuery, but it continually fails with a readyState of 0 and a status or 'error' The web service definitely works as I can call it using SoapUI, and I have had CORS enabled on the server. My code does not seem to reach or run the Success or statusError functions (although this could be because the code if failing ?) I'm new to JQuery so I'm hoping that this is a simple error to resolve. Thanks in Advance. The Code looks like this. <html> <head>
How to check the image size providing image path in jquery?
Hai am developing phonegap in android. i have a image path location,i need to attach the image when i attach the image i want to check the image size.Its not greater than 1 Mb.Am searching thishttp://jsfiddle.net/jquerybyexample/PKLQn/1/light/,but its input type is file .am using image path location.How to do this? image path=content://media/external/images/media/503. i need to check the image size
remember element value in cookie and display.
I have one collapse menu. In that menu. In this menu I want to next div open when we get current div. but I got some probe into that. here is my demo. and script given below. $(document).ready(function() { var widget2 = $(".widget2"); var box2 = $(".box2"); if (getCookie('box2cooki')) { // alert(getCookie('box2cooki')); var id = getCookie('box2cooki'); var Element = $(".box2#id"); alert(Element); //$(".box2").next(".widget2").slideDown(200);
jquery ie7 don't read script
Hi Everyone. I have some problem with my jquery/javascript code. Every browser (except Internet Exploder 7) read and executes the code. In IE7 looks like the code is not read - I have a few hidden fields - all are visible. I try with: $(document).ready(function() but nothing change. var disabledDays = ['15/8/2012', '1/11/2012', '11/11/2012', '25/12/2012', '26/12/2012']; function nationalDays(date) { var m = date.getMonth(), d = date.getDate(), y = date.getFullYear(); for
How would I write a function to pass an object's Name or ID to a widget's options?
How would I write a function to pass an object's Name or ID to a widget's options? I am using the jQuery UI MultiSelect Widget and want to set noneSelectedText to equal the object's Name (and/or ID or Title). I understand that the method for doing this is by calling $(this).attr("id"); but haven't been able to figure out the correct way to add that to my code. Script for assigning the widget's options (It's currently set it to call by Class instead of ID because I have close to 100 dropdowns). $(function(){
Next Page