body background random and clickable
Hi folks, Does anyone know how to make body background random and clickable ? Best Bomzon
Selecting Nested Table
Hi, I have been trying to add a table border to the third table. I will need to style it more also with radius and so forth. The "data" class puts borders on everything with data class. I want to just add a border to that one table. Can I add an id to that table? I am having trouble figuring out how to select what I want and how to go about getting this to work in all major browsers? Fiona. Here is the html code. Please can you help? Thanks. <!--<html xmlns="http://www.w3.org/1999/xhtml">
Fail to parameterize JSON object
Hi guys, I got a weird problem. I receive a JSON object from backend server like this: {"email":"someone@domain.com","pwd":"XXX"} However, when making an AJAX call with GET method, jquery makes the following call to my backend server, which fails to process. http://localhost/demo?callback=printResponse&{%22email%22:%22%22,%22pwd%22:%22%22} Not sure if it's some encoding issue? I have tried to unescape the data but it does not seem to make any difference.
Corrupt column text when create TD with more than 2 html tags
I try to write a code to create a dynamic table by clone a row from template row then modify each column , then append a row to taget table. Sample code @http://jsfiddle.net Everything seems to work fine until I try to add the 3rd tag (</BR />) to the TD content. This cause the TD content to corrupt. (In the example, the first column of the first row in the table which has only 2 HTML tags -- span and A is correct , but the first column of the second row which has 3 HTML tags was corrupted. I try
plugin to clone forms
Hi my first post :-) I am starting to use a number of JQuery plugins for a little project of mine. I am looking for a plugin to clone forms. In particular, my forms are nested and I need to let a user to be free to clone either the complete form or just a sublevel. (Say a form to introduce one tutor or more, for each tutor one or more students, for each student one or more assignments) I have seen and tried to use sheepIt, but it seems to be buggy, if you try to have more than two levels. Any advise
cleaner shorter code for if else
Hi all, I have this piece of code: var $arrowBackward = $("#arrowBackward"); var $arrowForward = $("#arrowForward"); if ( nextWorkChart==1 ) { $arrowBackward.fadeOut(300, 'linear'); } else { $arrowBackward.fadeIn(300, 'linear') }; if ( nextWorkChart==13 ) { $arrowForward.fadeOut(300, 'linear'); } else { $arrowForward.fadeIn(300, 'linear'); }; it is needed to fadeOut/In arrows if the user reaches (by several ways) the beginning or the end of a slider, so that reaching the first picture the backward
Jquery Newbie, Dynamic dropdown menu submission
Hello I'm very new to JQuery and I'm working on a script that is a form with a Chained or Dependent dropdown menu for Year, Make & Model selector that is MySQL/PHP - JQuery. I'm at the point were I can select all of the dropdowns but I'm stuck on how to send that data over to a php script (handleIndex.php) I would like to get the values that are selected and use some type of $_GET statement to redirect to the new URL with the selected values appended like ( handleIndex.php?year=year&make=make&model=model
Multiple instances
I've been programming for many years but still a little new to javascript and jquery. I have a gallery plugin that I would like two instances of on the same page. I understand the concept of creating a "new" instance of an object, but what I have is a little different. I'll scale down the code, but if more is needed then I will provide. Thanks class: ;(function($) { var allImages = {}; var imageCounter = 0; // Galleriffic static class $.galleriffic = { version: '2.0.1', normalizeHash: function(hash)
footer jumps up after hidding div
Hello, I have a div close to the bottom of the page, and I toggle visibility with a button. I tried the slow and fast options, and the animation works well for the div, but the footer of the page, jumps up and down abruptly... is there a way to manage how the footer "re-accommodates" after the new space being available? Thanks!
Ajax PUT json body missing
Using the following ajax request the server does not get any json body content in the request. I have testing the server with cURL and POSTMan chrom plugin and all is working. var xhr = $.ajax({ type: "PUT", url: url, contentType: 'application/json', data:'{"key": "val"}', dataType: 'json', timeout: 12000, // 12 seconds because server is so slow headers: { Accept: "application/json" } }).done(function( response, status, jqXHR ) { console.log('Update successful',
How do I get an elements height after $.get ... ?
Hi there, I'm doing my first script with jquery and can't figure out how I can get an element's height after I loaded content to it using $.get(). The alert you see in the code below shows 0, even when I loaded HTML content to the respective element before. Any ideas? Thank you very much! function showDetailbox(e,clicked,scrollto) { var opened; if($(clicked).parent().hasClass('current')) opened = true; if(e) e.preventDefault(); if(scrollto) $('html, body').animate({ scrollTop: $(clicked).offset().top
Accessing a variable set in jquery.ready (from outside the jquery block)
I am trying to access a variable that needs to be set inside the ready code. The variable doesn't get set as I expect - I'm never able to see the value 5 for testVar. What am I doing wrong? <script type="text/javascript"> testVar = 1; // Decalred globally $(document).ready(function() { testVar = 5; }); alert("Value: " + testVar); // Always returns 1 not 5 - why? </script>
Class: hidden - Problem
Hello, So, here I am, Just a rookie when it comes to jQuery. I'm learning by reading books. I am currently working with the "hidden" class. I have a title (h3) and 3 buttons. I wrote some jQuery-code to make the buttons dissapear when there is no button clicked and leave the title(h3) where it is. But the opposite happens. As soon as I load the script in my browser (doesn't matter which one), my title dissapears and the buttons stay where they are. Am I doing something wrong? I'll paste the code
How to see xml tags in jquery alert
hi all, i am currently working with jquery..I want to show the xml contents in the alert using jquery. i am using the following code. but while executing it the output is shown as an object .i want to see the xml structure.can any one help me plz. function test() { var xmlDocument = $.parseXML("<Collection/>"); var FacetCategories = xmlDocument.createElement('FacetCategories'); var FacetCategory = xmlDocument.createElement('FacetCategory'); var FacetCategoryAttr = document.createAttribute('Name');
problem with too many scripts
Hi this is my first post on this forum and I need help. I use on my website scripts, and I have a problem with two scrips - is conflict between this scripts. Ok this is my scripts: <!-- scripts --> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script> <script type="text/javascript" src="js/modernizr.min.js"></script> <script src="js/jquery-lang.js" charset="utf-8" type="text/javascript"></script>
how do i open a different lightbox for each item on a page?
hello. on my contacts page i have lots of contacts each with there own map img. at the moment not matter which map i click it opens the same lightbox. how do i tell it to open the correct lightbox? <div id="location"> <a href='#' class='basic' id='1'><img src="http://www.rickyspires.co.uk/wp-content/uploads/2013/03/google-map-icon-small.png" width="20" height="20"/> <div id="lightbox" class='1'> <div class='close'><a href="#">Close</a></div> <h1>location 1</h1> </div></div> <div id="location"> <a
Helping for Context Menu-Reg
Hi, How to implement Context menu as i like, because i found so many plugin all the menu showing same content for all, but i want like below CCA CCA2007 if right click : 1."Add CA" 2."Add Trust CA" CA if right Click : 1."Add Sub CA" 2."Edit Sub CA" Please help me to implement the above using context menu Thanks in advance Regards G.Lenin
Execute function if two statements are true (jsFiddle & gist link provided).
Hi all. I've just created my account @ jQuery.com, so a quick "Hello world" to you! The problem: I need to execute a function, if 2 events are true. Or false. Depends on how you write the code, I guess :) Basiclly... I'm just lost! I've been trying for hours to get an animation to only execute when 2 statements is true. I have tried simple solutions and really far out attempts. This is would seems most logical for me. I have commented 100% of the code out so if you have any questions about any of
jQuery routines not working on php dynamically constructed table
Hello I've got a php dynamically constructed table in one file: ol_list_ActivityPrivileges.php In my main file - the table is pulled in through the following script: $.getJSON("ol_list_ActivityPrivileges.php", function(data) { $('#address_Book').html(data); }); The table comes through perfectly, and forms the html just as I figured it would. The problem is when I try to run jQuery listeners on the html elements (such as click event on a button), the jQuery doesn't fire. Why is this and
allowing/ not allowing animation.
I am soooo confused, and cannot figure out the last most important part of this script. I've taken over somebody else's code and I'm new to Jquery. On the page is a set of navigation and a set of images. When the user rolls over an item, the images animate expand/contract. Then, if they click on an item, a second animation moves the pictures and adds a php file to include in the page. The problem is that the first rollover animation function still runs when the user mouses over images or text. I
href issue - it is appending the entire url to it in IE
Hi All, I am having issue with one of the "href" link in the home page which is written in Struts (JSP), but we are starting it in jQuery. we made wrote functions and load the home page, we have hardcoded the sub packages like this window.location.href = /sub1/sub2/template#HomePage In IE, what is happening is that it is appending the entire url to "href" link on the home page, like this href="http://localhost:8080/sub1/sub2/template/helpPage" but in Firefox and Chrome, it is coming like this, which
Stop running the script. A script on this page is causing IE to run slow.
Hi All, I am using jquery-1.8.0 with richfaces-3.3.3.final version along with JSF1.2 and Jboss EAP 5.1.2. I am loading a rich tree but while loading it getting a messgae on the IE stating script is running very slow but the same is working in to mozila. 1) When the IE8 browser takes more time to run the java script, IE responds with a dialogue box "Stop running the script. A script on this page is causing IE to run slow.Do you want to stop" 2) If Yes is given the script stops running,the
How do I add odd/even class only for table rows which haven´t had odd/even class yet?
How do I add odd/even class only for table rows which haven´t had odd/even class yet? (for some tables I use php cycle function) How do I have to change this code? $("table tbody tr td") .parent("tr:nth-child(odd)") .addClass("odd") .end() .parent("tr:nth-child(even)") .addClass("even");
Analyse HTML file
We have a database diagnostic tool that analyses the database and gives out a HTML report. I am trying to use jQuery to analyze this HTML file and provide conclusions and decisions based on the data in TABLES in the HTTML file. I cannot modify the HTML file to add the script tag in there. Can i create a separate plugin / jQuery script file that asks for the name of this HTML and then does the analysis? Regards, Vikram Rathour
drag and drop is unable to save the path into mysql database for php
Hi i am newbies here and this is my first post asking for help can someone help me to correct this code so that i can use it. thie is the LINK that i copy the code and the below code is copy from HERE thank you if(move_uploaded_file($pic['tmp_name'], $upload_dir.$pic['name'])){ // now insert the data in the database $stm = "INSERT INTO images (new) VALUES (:new)"; $query = $db->prepare($stm); $query->execute(array(':new'=>$pic['name']) ); exit_status('File
JQ Grid - disable right click
How to disable the open to new window on right click in jqgrid? Your help is appreciated Regards Bala
How to prevent Internet Explorer from downloading JSON response?
I have a feeling that the solution to my problem is stupidly simple, but crawling through Google has provided me with none. I'm trying to handle the login process on one of my clients' site using the AJAX functionality provided by jQuery. Here is the $.ajax() call in question: $.ajax({ "cache": false, "complete": function() { $('#spinner').hide(); }, "data": { "user": user, "pass": pass }, "dataType": "json",
can not unset (delete) a variable ?
hello, I have some code that gets a class and puts it in to a "var" but i want it to unset when the lightbox is closed ? The way the code works is it puts an image class in to a var then when you click the image it opens up a lightbox with the same class. The problem is when i close the lightbox it does not unset the var so when i click the next image it opens the same lightbox window and not the correct one ? unless i refresh the page. how can i unset the var when the lightbox is closed this is
How to create a jquery slide to next page
Hello Support, I really like the website: www.metro.co.uk especially the loading the next page from the side or in fact any page. I'm guessing this is done by jQuery, if so how...? Can anyone help me..? I've got a client that would love this on their site. Thanks Wayne
Re: jQuery / cycle plugin problem
Hi, I'm having a weird problem that I just noticed. I built this website (www.morepromo.ca) about a year ago using jQuery 1.7.1 and the Cycle plugin and everything worked great in all browsers. I recently noticed however that the page loads exceedingly slow in all browsers. When I first built it, it would take ~3 seconds to load everything. Now it takes ~30 seconds or more and nothing has changed. When using firefox, I now get an error saying that a script has stopped responding and it is the jQuery
How to add common parameter in ajax.
Hi Friends, Is there any option to add common parameters in jquery ajax. I want to add these parameter every time while calling jquery ajax in many times. Thanks, Kumaresan.
Scroll single row in table on pressing down arrow key
I have table with fixed height and overflow = scroll. when i press down arrow , i am highlighting the next row correctly. My doubt is when row reaches bottom of the visible screen, how to move the only one down and also on pressing the up arrow, when the highlighted row reaches the top of visible row, how to move only one row up in the table. Thanks in advance.
mouseover drop down does not work
http://www.countyfairgrounds.net/testwebsitedesign/testsix.php I am using <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="/js/bootstrap-modal.js"></script> I am "trying" to do a mouseover with a drop down and up jquery feature in the center of the page above the brow welcome box on the left column I am new at this. What I am trying to do is this http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_slide_toggle AND no it does not work and
Trying to Use filter with Regular Expression
I'm trying to use the filter method to filter out unwanted anchor elements that I'm trying to manipulate on a page. My selector looks like this: jq('a${esc.h}id').filter(/\D{3}\d{3}\D{5}/).each(function() { ........ }); I have tried to create a regular expression to use in the filter, but it must wrong because when I try and display the page without the filter and regular expression it works fine. But it doesn't work when I add them to the existing selector.
jstemplates.com
I recently developed an online template builder (www.jstemplates.com) for which I used quite some JQuery modules. I used the JQuery UI accordions, slider, buttons and dialog. I also used the superfish menus and spectrum, a colorpicker. I would never have been able to build this thing in only 3 weeks without the power of JQuery. Thanks to all developers making this JQuery framework an excellent starting point for web developments. I believe JQuery should be built-in into browsers :) Give www.jstemplates.com
Sequence of effects in a Backbone.js application
Hi All, I have a question related to chaining effect on elements in a Backbone.js application and how to achieve that. I have a Backbone.js application which has multiple Backbone.View's. Each of the views is tied to a <div> element on the page and the view controls/owns that element with all it's children. My design choice is that other views don't know or care what children are in each of the views and what effects are applied to them. All other views how is that each view has a show() and a hide()
Autocomplete Json from url Please help
hy, guys i have a problem i am trying to get autocomplet to show relevant information from an URL and i dont know how ... please help me. here is the code ... Any info that could help me is important thank you very much <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Autocomplet</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
Why this is not acting well? and even more Why it goes wrong in different way depending on the browser?
Hi there, I've put a post 2 days ago about this, but I have found other way to get the same and this one is about that way. I'm searching for a solution to cover/discover some DIV's. (All divs ar floating left) 1.- When you click a DIV, it change its width to 200px by adding a class and the following DIV's gets other CSS class with an animation which move them from -100px to 0. With this, we obtain the effect of "discovering" the clicked DIV. 2.- If there is an open DIV, the following of it,
Need some help with toggleClass
I'm very new to jquery, and I appreciate any input. I'm trying to get over my fear and distrust of all things javascript! I'm updating some documentation in a Rails app. I have a sidebar with navigation links. Each link connects to an anchor in the documentation. I'm trying to use toggleClass to change the styling on the sidebar links when they are clicked, without changing all of the links in the sidebar and without changing the styling of links in the documentation. :javascript $(document).ready(function(){
.load() with beforeSend action
This works fine: $.ajax({ url: "http://myurl.com", dataType: "text", beforeSend: function(xhr) { xhr.setRequestHeader("Ajax-Request", "true"); } });However I need to return the results in a div. The only way I've found to do this is to use the load() function. $("#div1").load("http://myurl.com");The above also works but I need to set the request header to preform some different logic. Is there a way to set the request header using the load function?
Next Page