Succession of fadeIn functions
I have a succession of fadeIn functions. I have coded it like so. It works. $(document).ready(function(){ $("#div1"). fadeIn ( 2000, function(){ $("#div2"). fadeIn ( 2000, function(){ $("#div3"). fadeIn ( 2000,
How to add a color to a list without using css
Hi everyone, I have this code: <div class="amenitiesul"> <ul> <li>Junio</li> <li>Setiembre</li> </ul> </div> I need to put two different colors background at "junio" and at "setiembre". And I can not add an "id" neither "class". I don't know how to do it, somebody can help me please? Anna.
js array tostring
Hello, I like the nifty behavior in js where toString() on an array converts the array into a csv. However, the csv is created without spaces after the commas. For example: var accounts = []; accounts.push(123); accounts.push(456); var myAccounts = accounts.toString() //writes out 123,456 Sometimes I want to display this csv to the user so proper formatting would have a space after the commas. What is the easiest and most elegant way to put a space after the commas in a csv like this?
Collapsible.js, how to close when submit form happened ?
Hi, I am using jquery.collapsible.js : when I click in one of the triangles : My question is how to close the opened one when the form is submitted ? Thanks.
ejecucion de varias "ordenes" mediante un boton
hola, Estoy Intentando implementar un boton En Una pagina de php Con Una Rutina de HTML Incorporada (este boton esta Dentro de la Rutina html) aqui el codigo: <script language=JavaScript> function calc() { vent=window.open('','tpv','width=725,height=600,scrollbars=no,resizable=yes,status=yes,menubar=no,location=no'); document.forms[0].submit();} </script> ........ <a href='javascript:calc()'><img src='img/imagen.png' width='94' height='31' /> como veis, al pulsar el boton hace una llamada a la funcion
send data (POST) from jquery to controller in cakephp
Well, The problem is that I always get the same error "anonymous function" is because when I want to send data via post these never find the Controller or the path to the Controller, I have proven with three ways to send data in the JS. validate.js $(document).ready(function(){ var route ="<?php echo Router::Url(array('controller' => 'soyaproductorcompras','action' => 'validate_form', 0 => $this->request->params['pass'][0], 1 => $this->request->params['pass'][1]));?>"; $('#proveedor_carnet').blur(function(){
$.post(URL,data,callback) is the same of $.ajax({})?? If yes, w en should we use one instead of the other one?
Im starting to study ajax, and I did my first example reading a tutorial. In my first example, Im deleting images from a gallery, without loadingmy page. I have a jQuery function that executes when I click in my image with class "imagesdel", and then I get id of my image to use in my post. $(function(){ var url = 'delImage.php'; $('.images ul').on('click','.imagesdel',function(){ var delId = $(this).attr('id'); $('.images ul li[id="'+ delId +'"]').css('background','green'); $.post(url,{action:'del_images',image:delId},function(){
Not showing images in url rewrite in htaccess
I have to rewrite url (http://localhost/abcd/subcata.php?id=23&title=building) to (http://localhost/abcd/31/buildings) I have done rewrite rule with the following code but other extension files like images, css are not accessing. Images are located in (images) folder, What i do to show the images or attached css files. thanks in advance RewriteEngine On RewriteRule ^(.*)/(.*)\/$ http://localhost/abcd/subcata.php?id=$1&title=$2 [NC,L]
When we should use $(document).ready(function(){ in our jquery program?
Hi <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery.each demo</title> <style> div { color: blue; } div#five { color: red; } </style> <script src="jquery-1.11.0.min.js"></script> </head> <body> <div id="one"></div> <div id="two"></div> <div id="three"></div> <div id="four"></div> <div id="five"></div> <script> var arr = [ "one", "two", "three", "four", "five" ]; var obj = { one: 1, two: 2, three: 3, four: 4, five: 5 }; jQuery.each( arr, function( i, val ) { $( "#" + val
jquery tabs
Hello, i developed an application to test webservices and return a json code and i put it in new tab of (.ui-nav-tab). when i select the webservice, a new tab will be created with json code in the content-tab. But i have a big problem !! when i add a new tab, the content of the previous tab become empty. Can you help me please. i have a short deadline.
How "$(selector).each()" function is working in jquery?
Hi Here is the code : <!DOCTYPE html> <html> <script src="jquery-1.11.0.min.js"> </script> <body> <table id = "myTable" style="width:300px"> <tr> <td>Jill</td> <td>Smith</td> <td>5</td> </tr> <tr> <td>Eve</td> <td>Jackson</td> <td>5</td> </tr> <tr> <td>John</td> <td>Doe</td> <td>11</td> </tr> </table> <script> $(document).ready(function(){ $('td:last-child').each(function(i) { $(this).html((function A(n) {if (n==1) return 1; else return n*A(n-1)})( $(this).html()
How to use jQuery in Refresh Monkey? (Chrome plugin)
Hi all friends. Sorry for my bad English. I am using Google Translate. My question is this: I installed a plugin for Chrome called "Refresh Monkey". Monitor websites and warns you when the content changes. This is a screenshot of the plugin: As you can see where I marked in red, tells me to receive notices of specific things I need to put "jQuery commands." By giving "jQuery" sends me to this website: http://api.jquery.com/category/selectors/ Here I appear "command line". I do not know what to do
first / last page and zoom
Hi everyone, I have a webpage: http://goo.gl/36bcwm I want to add first / last page and zoom button to the web page to read book easily. I don' t know how can I add them? Could you help me, please? Thanks for your help Regards
How to call iframe parent function using jquery?
Hi, I'm after something like this - only working :) jQuery('#ilightbox').top.myfunction(); Can Somebody help me pleaes?
Set focus on a div after form is submitted
Hello all, I've been working with a fairly simple contact form that emails info to a client when it's submitted. within the <form></form> tags, i have <div id="response"></div> which is where my "success" or "fail" messages appear after the form is submitted. I would like to set the focus on that div after the form is submitted but can't seem to work out how to do that. So far i have tried adding onSubmit="$('form #response).focus(); to the form, but it isn't doing anything. I've also tried: <script
How to remove the <option> from selector <select> using JQuery
Hi, In my JSP page I have a drop down values associated with different id's, now I needed to remove some of the values from that drop down based on their id's which I would get it from a database. Can anyone please help me with the query statement that would be created run time to remove an option. Thanks!
Orderby data in an array
Hi All, I have a grid. I want to orderby(sort) data based on two columns. EmpID EmpName Dept Date Of Joining 1 ABC D1 1/1/2011 2 DEF D2 1/1/2011 3 GHI D3 2/1/2012 4 JKL D1 9/1/2012 5 MNO D2 6/1/2014 I want to sort this data in two ways. First it should be sorted by "Date Of Joining" - DESC and then grouped by "DEPT". All employees of same dept should be grouped and displayed with Date of Joining as highest. I have the entire data in an array. I want to achieve this using jQuery. Please suggest Thanks
Jason object member access issue
When I try to access the member of jasonp object(val.pc_eventDate) it gives undefined error. But the val object 12 member and all members has values. $.ajax({ type: "GET", url: URL, dataType: "jsonp", jsonp: "callback", jsonpCallback: "GetAppointmentCallback", success: ServiceSuccess, error: ServiceFailed }); function GetAppointmentCallback(json) { $.each(json.GetAppointmentsResult,
Can we add inventory to an auto-reply?
Hello all, We have an email template that we want to send to web users once they have filled a lead form. The email will contain the details of the product they were interested in (which they will have indicated in the form), along with a list of current inventory matching that product. My question is, how do I go about creating an inventory box or list in the email template that will automatically update itself with appropriate items each time it is sent out.
jquery and responsive design
Hi, I'm busy creating a responsive website, now my problem is that when the screen/site hits 800px a php function is suppose to happen. I've asked around and apparently you need javascript to do that. I'm not sure how to go about do that. Can anyone help me? If you need more information please let me know. Thank you
problems with input
Hello friends, I'm new here ... and I do not speak English, so translating this through google ..... Let's go to the problem .... I have two inputs, input1 and input2, what I want is that both have input in its box a color value = "0". If I select input1 in case it should automatically clear the default value and I can enter my once done, select it from the box input2 to enter other information .... Once selected case input1 and delete the default value, if anything will select box input2 (before
How do I change the size of the left thumbnails in this?
website is www.tdsjr82.com I'd like the thumbnails to be the size of the borders near them, I can't figure out how to do this in CSS. Any hep
jquery html call never completes
greetings i have the following code: which on submit calls a html page which has a preloader set up which shows an animated gif until the html loads. If i go directly to html page it works as expected with the animated gif and load. When i use my code below and use the submit button the html page loads the animated gif and just sits there and never loads the content of the html. Any suggestions please? Thanks 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
Things that happen using jquery-2x and don't happen using 1.7.2
Hi all! I have a div tag fixed positioned in lower left part of the page. It works perfectry using jquery-1.7.2 and 1.8.3(also 1.6.4). But when using jquery>1.9.1.....to the "edge, it disappears. Looking in the Firebugs, it shows "element.style" and "display:none". I have never wrote inline style. I searched in css,js,html...all posible thing that could affect to this div. But I could not see why. The page is long one, so I cutted less than 10% of page and copied and pasted in fiddle. It also happens.If
adding ajaxStart to jquery
Greetings I've been trying to add ajaxStart function to my code unsuccessfully. This is what I have so far which is working. I just need to add ajaxStart to my existing jquery so that when a user clicks submit and requests a html page you can will see a loading or an animated gif while the user waits for the page to load. I've been looking at the ajaxStart documentation but I still can't get it working. Any suggestions please. Submit Query
Adding "internal links" with UI Tabs?
I am using UI Tabs ( http://jqueryui.com/tabs/ ) to organize a multi-part form, and I need to add buttons or links at the bottom of each content area to guide the user to the next tab. So basically I need another way to navigate through the tabs. For some reason, links inside the content areas do not do anything if they are going to a tab anchor on this page, or even trying to reload the same page. It adds the anchor link to the address bar but doesn't go anywhere. I have to manually refresh the
How do I use scrolling to trigger events?
I'm not sure if this is a jquery function, but I'm trying to figure out how to use the position of a user scrolling down a page to trigger events, e.g., launch a video or audio clip or slide in a window. The Guardian used it to great effect in their special report here: http://www.theguardian.com/world/interactive/2013/may/26/firestorm-bushfire-dunalley-holmes-family As the user reads the story, still photos come to life as videos, audio clips play, and text fades in over graphics. It seems to be
Multi IFs
Hi all, I'm very new to this, and can't figure it out how to do this, please help: What I'm trying to do is: when select grade = 3, AND class = english, AND radio checked yes, then show div. Here's the code: <p> <select name="grade" id="grade"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> </p> <p> <select name="class" id="class"> <option>math</option> <option>history</option> <option>english</option> </select> </p> <p>
Is possible use div ID as name of array that already have value?
I make this function based on arrays http://jsfiddle.net/rflfn/UBy38/ I have more than 200 functions based on link ID and array values, so I need eliminate the necessity of tags 'if', and associate the div ID name with array name (array already have values, and I make array with same name of div ID), So i need call array values based on div ID name, but without 'ifs', I used deep copy to clone array to my new variable, and call array with variable, but dont work... This is what I need make: http://jsfiddle.net/rflfn/UBy38/1/
click on link to display text
I've seen quite a few tutorials where you'd add/remove test in a div but it was all within the same div. Could you recommend a tutorial or post a simple snippet of code that would illustrate adding removing text by clicking on a link in one div to display text in another div (in a different part of page) To be more specific, I've got a few product names listed in a sidebar. If I click on any of them, its description will be displayed in the main area of the page. Thank you
Scope in each()
Can anyone help me please? I declared a variable out of function. Then I used this variable beteen each() function. How can I get out of the function same result of variable "titulo" than local's "titulo"? Here the code. Tahnk you!! http://jsfiddle.net/#&togetherjs=LB5r8PApDq
How to get id as variable?
Hi everybody, I have the code <input name='t[]' type='text' id='a_$element' value='$value' /> $element is integer as 1,2,3 ... $value the value when I input Please could anybody show me : How can I get by id in jQuery?
load
Hello, I have the following code: $(document).ready(function() { $("button").click(function() { $("#div1").load("demo_test.txt"); }); }); Running Google Chrome,nothing is loaded and I get an error message in the console: XMLHttpRequest cannot load file:///C:/Cursus%20XHTML%20en%20CSS/CSS%20-%20JavaScript%20-%20jQuery%20-%20XHTML/demo_test.txt. Received an invalid response. Origin 'null' is therefore not allowed access. Using the Firefox browser, it works! Can someone explain why? I am (still)
Chopping up document.URL: is there an easier way?
Hey guys - this is the short description of my question: My URL contains two query strings and (optionally) an anchor link. let's say for example it is http://www.ilovescript.ing/test/urlparsing.html?from=1&to=10#article2 Within the scope of this question I want to end up with a var that is just from=1&to=10 so I came up with these lines, but I am curious if it can done with less variables and code! var TheUrl = document.URL; // set current url as TheUrl var ChoppedUrl = TheUrl.split('?',
jQuery ajax .load resets page layout
Hi All, I am new to jQuery and Ajax, but not to web design and development in html, css, flash and swish etc. I have a standard css/html web page and I am using .load to load an html page into a container. The html page is stripped of everything except content and relevant resource links (no meta etc.). My main website is centred in the browser, but when I load the html page into the container, the whole thing moves to the left of the browser. What am I missing? Main html: <!DOCTYPE html PUBLIC>
Writing functions as variables
I am new to jQuary and although I can write functions I can only seem to write a function for everything! One of the methods people use at work is writing functions as variables to cut down on code. However I just can’t grasp this – I find it confusing. Are there any tutorials for doing this particular method? Example below $('.PatchyTopPopUpDiv').click (function () { var ToolTipLink = "#"; var ToolTipImage = $(this).attr('id'); var ToolTipDiv = "Div"; var EmailTool = "-Email"; var ShowToolTip =ToolTipLink+ToolTipImage+EmailTool
.click (function() event problem with text()
Hello. I noticed that when i use the click event for a button... a strange thing happend. I use text() to post a text on the screen but the text disapears after a second. What I can do to show the text all the time.... $('#but').click(function() { $('#err').text("OK"): });
One big "Concertina" page - nearly working . .
People, I have managed to get started with: http://philiprhoades.org and it is _almost_ doing what I want - which is: when someone expands one section, I would like any other expanded section(s) to be collapsed, so the total page length is always minimised. I guess this must be possible but I have no clue about how to start modifying the code to get it to do this . . Pointers to code where this behaviour is already available or how to get it done are appreciated! Regards, Phil.
maintain proper width for popover outside the parent container
Hi. I am trying to develop a popover such as Bootstrap popover The thing is though the popover gets deformed as it is moved to the end of its parent container as shown in the image. I would like to keep its proper width even if the popover appears OUTSIDE the parent. Of course, setting css 'width' can help a bit, but it does not flexibly alter the width according to the inner text. I would like to maintain minimum width so that the inner texts do not get forcibly go to a new line. any idea?
Custom Search URL using jQuery and Joomla 3.0
I am new to this forum. The goal is to create a text box and eventually insert the data into a URL. For example: We need to create a text box and have a button that when clicked takes the data in the text field and inserts it into the "variable" part of this URL (then takes you to the URL site): https://forexample.com/storefront/search.do;jsessionid=CD66CBFCC5658D6C9327AA269764EBB2?searchType=keyword&keyword="variable" I wrote this jQuery: $("button").click(function() { var variable = $("#textbox").val();
Next Page