Question regarding Select element
I have a select button which will create multiple select elements. How do we know which select element is selected? Is there any index value which will give the selectedindex for the select item
Want to show one section of Div when page is initially loaded
I'm new to Jquery and I need some help trying to get this page to load the "#page1" when the page initially loads. I've tried a couple things but am either getting nothing (from the display:none in CSS) or if I remove that, it displays all the "#page1-3" elements alltogether when the page initially loads. It works fine once I start clicking the menu, its just the initial loading. .page { position: relative; display: none; } </style> </head> <body > <script src="jquery.js"></script>
Recognizing coming from one page and animating.
So, I have a index page that moves like a slide show when you click a nav link, then sends you to the page. I am trying to figure out how to go from that pages nav links (when clicked), back to the index to automatically play a slide animation, then redirect to the original link intended. This is kind of funky for me because it is going from one page-to another-to another. SO IN REALITY, I need help trying to make this thought come to life in my jQuery. I already have the reDirect set up, so it's
jquery cycle - images disappear on mouse over in IE8
Just created a new slideshow based on the tutorial for this demo: http://line25.com/wp-content/uploads/2010/slideshow/demo/demo.html It resides at: http://www.hccmis.com It works fine every where except IE8. In IE8 the images disappear upon mouseover. I have tried about a half dozen potential solutions mentioned in this and other forums but no luck. Any suggestions?
Add Remove form HELP?
OK. I'll admit that I do not know what I am doing and am a NEWBIE. But I am stuck. I have a form that adds a product to a pricelist. The submit button on the form value is ADD. It adds it using AJAX. But I want it to change the ADD to REMOVE and be able to click remove and turn that back into add. The code I use for this looks like this: <script type=\"text/javascript\"> $(document).ready(function() { $('#form').submit(function() { // catch the form's submit event $.ajax({ // create an AJAX
I've run into a dead end - fadeToggle.
Hey Guys.. I'm new to jQuery, but very excited about it. go to the website to see my struggle! http://www.raschanga.dk/rasmus As you see i've put a background in the div, and several pics with letters on top of it.. with jQuery i did so the black letters fade away and the background shows instead. (don't mind that the background doesn't really fit, and you can see it allthough the letters aren't faded out, i'm on it!) BUT! When you hold the mouse on a letter for a while it actually disappears from
Duplicating a table containing objects but modifying its attributes
I am doing a project and it turns out I'm trying to cycle but I could not find the solution. I found out there. clone but this makes me a duplicate with all the attributes and complete, but by manipulating the images does not allow me that each has its own attributes, I advise? </style> <title></title> <script type="text/javascript"> $(document).ready(function () { $("dd").hide(); $("dt").click(function (event) { var desplegable = $(this).next();
como duplicar una tabla que contiene objetos pero modificando sus atributos
estoy realizando un proyecto y resulta que estoy intentando hacer un ciclo pero he podido dar con la solución. por ahí me encontré con .clone pero este me hace un duplicado con los atributos y todo completo, pero al manipular las imágenes no me permite que cada una tenga sus propios atributos, que me aconsejan ?? </style> <title></title> <script type="text/javascript"> $(document).ready(function () { $("dd").hide(); $("dt").click(function (event) {
how can i cancel out a toggleClass when clicking on a different element?
hello. so if i have set it up so that when you click a div it enlarges an image using toggleclass. the problem is that when i go to the next page without clicking on the image to cancel the toggleClass it carries to fx to the next page. i would like to return the toggle to its previous state on clicking of the next page button. you can see some code here: http://jsfiddle.net/rickyspires/ypmdr/114/ but it does not include any page turns thanks rick
toggle or show/hide question
hello. i have 2 divs side by side that are both width 50%. i want to make it so that when you click on the left or right div the other one will disappear and the remaining div will change to 100%. then when you click it the second time it will return to 50% and the other div appear. this is what i have $('.scroller').click(function(){ if ($(this).hasClass("left")){ $(".right").hide(); $(".left").css({"width":"100%"}); } else if ($(this).hasClass("right")){
Remove CSS attribute from div outside of ajax response div.
Hello all. I have been frying my head over this, and I am sure it may be pretty simple and would appreciate any help/guidance. My problem is the following: I have a menu, when user clicks on one of the links it loads a page through ajax within a div. My problem is that within that ajax content I have a dropdown menu. When the user changes the selection of the dropdown menu I need jquery to remove a CSS attribute from the menu that is outside of the ajax content. I can not figure out how to do this
Syntax error, unrecognized expression: :not(:contains(';Meeting Minutes')) Works fine in IE, but not Firefox
I am attempting to do a comparison and it works in IE but not in Firefox. I am assuming it has to do with the semicolon. How do I go about escaping this appropriately? The error I receive is Syntax error, unrecognized expression: :not(:contains(';Meeting Minutes')) I cant just compare the text as there could be a word such as Plan as part of a string, but I only want it when it matches Plan explicitly. $(".EI-Disc-Outer").each(function(i){ var pageMetaTitle = "\;" + pageTitle;
Things I don't understand about the ajax function
Say I have a form like this (taken from a book on jquery): <body> <form> <label>Enter your Name</label> <input type="text" name="uname" class="uname" /> <br/> <input type="submit" id="submit" /> </form> <div id="message"></div> </body> and an ajax function like this: $(document).ready(function () { $('#submit').click(function () { var name = $('.uname').val(); var data = 'uname=' + name; $.ajax({ type: "POST", url: "welcome.php", data: data, success: function (html) { $('#message').html(html); }
having trouble selecting grouped divs
hello. im having trouble selecting selected all divs i have grouped together some divs and i want it so that when you click on a group of divs it will add a class to each of the divs selected. i.e group1 = 1+2 group2 = 3+4 group3 = 5 if i select group 2 divs 3+4 will have the class selected added. please see my jsfiddle: http://jsfiddle.net/rickyspires/h2kbF/110/ this is the code: <div id="book"> <div id="page1" class="page">1</div> <div id="page2" class="page">2</div> <div id="page3"
How can i NOT trigger window.onhashchange on certain clicks?
I have 2 buttons - A and B. On clicking A the hashtag changes and i want to call the window.onhashchange function. But, on clicking B, i am manually appending hashtag to the URL. In the later case, i don't want window.onhashchange to be triggered. I have searched a lot. Maybe my fundamentals are not that clear. Please help me out here.
regex id for button
how can i assign code to id starting with "d_" for exampe when i clicked button which id start with d_ some function will run $(document).ready(function(){ $( //id starting with d_).bind("click",function(){ //ANY CODES }) }) $i=0; while ($row = mysql_fetch_array($result)) { $i++; if ($row["OrderID"] != '') { echo ' <tr class="tr'.$i.'">
Old jQuery.attr('href') functionality
Hi I'm trying to upgrade a large number of sites at work from very old versions of jQuery (1.2.6, 1.4.3) to the latest version (1.9.1). Things are going pretty well - the Migration script does most of the legwork even though that's only for 1.6.4 to 1.9.1, I think I've got most of the other changes that need sorting. There's a couple of issues I've run into though, with the main one being the changes from .attr() to .prop() - as all of our code uses .attr() and some breaks if we just change it to
Video control by frame
For a website my customer wants to display a video. This video shows a house which makes a turn of 360 degrees. By pressing a right or a left button the user needs to have control over the animation and turn the house right or left. To make it even more difficult, the house must turn in 4 steps from 0 till 90 90 till 180 etc. When the animation stops clicable areas must be shown to show information. What is the best way to approach this? I think to cut the video i have in seperat frames and then
Images on the background side
Hi everybody ! I present you my problem: I have to create a website with the central part fixed 1080px wide, a yellow background (color to the body, it's easy), and images on the left and right images, do they dont have to affect the horizontal scroll. If you look at the website of LaStampa you can understand better what I mean: http://www.lastampa.it/ The feature that I need is that the scroll "feels" only the central element and not the images of the cars. How can I do that? Thank you!
load multiple file with get
How can I load 3 csv files and parse them? When I use the jQuery get method I have to wait for the callback from the get...but how can I wait for all 3 callbacks?
Show hidden inline-block elements with jquery 1.9
I've problem with showing hidden blocks, if they are css: inline-block. div.profile{ display: inline-block; } <div class='profile' style='display: none;'>profile info</div> But when i do $('.profile').show() it becomes style='display: block' (i can see it in firebug) and overrites my css style... How can i fix this? if i have visible inline-block, then hide() and show(), it still will be inline-block, as has written in documentation. btw, in jquery 1.4 it works correctly. Thanks. AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBulgarianCatalanChinese
Show / Hide and Slide Table
Hello, I have a table where in one of the rows I have a child table. When the anchor with class "Show" is clicked I would like to: 1 - Make the child table visible ... Sliding it. 2 - Change the anchor class from "Show" to "Hide". <table class="Parent"> <tr> <td class="Task"></td> <td>Row1</td> </tr> <tr> <td class="Task"><a class="Show">Show</a></td> <td>Row 2 <table class="Child" style="display: none"> <tr><td>Row1</td></tr>
multiple .js files error: undefined
I'm trying to have multiple .js files. Each file will do specific tasks. When I have the code in a single file all is good. But when I break the code up I get: 'term' is undefined common.js $(function () { $("#equationSubmit").click( function() { var myTerm = getTerm(); // do work here }); }); var terms = []; terms[0] = new term ( ); terms[1] = new term ( ); terms[2] = new term ( ); terms[3] = new term ( ); terms[4] = new term ( ); terms[5] = new term ( ); term.js var term
Clarification on multipage jquery sites
Hello, I am new to jQuery, and I think the "problem" I am experiencing is down to simply how jQuery operates, but would welcome some clarification... When I have a multi-page jquery site, interlinked with hyperlinks, then clicking on a hyperlink causes the URL to change, as one would expect, and for the new page to load. However, I have found that any javascript functions I want to call must have been included on the initial home page. For instance, if index.html links to page.html, then when I
Collapsible blocks tiny after changing to latest script.
I am new to jquery mobille so thought I'd test it out properly by creating a mobile version of my own site. So far so good and the options available are fantastic. My issue though is with the collapsible block 'accordion' menu. I initially followed a tutorial online and it was only when I got to applying the collapsible blocks that I realised the tutorial was quite old and the scripts I had copied from the tutorial were: <script src="http://code.jquery.com/jquery-1.4.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script>
Checkbox check should automatically and slowly fadeout to unchecked
I have created a elevator functionality [there are 2 floors and corresponding to each one , there is a checkbox. Depending upon which checkbox is checked, the elevator shud move to that floor. Only thing which i am not able to implement here is: Make the checkbox check automatically and slowly fadeout to unchecked state when the orange elevator has reached that checkbox. Here is the link to the markup and script: http://jsfiddle.net/hurricaneankit/qR4uJ/
Show on click
I wrote a script that when a thumbnail is clicked that it will display an image in a separate div. It works but the problem is it switches the new image, fades and then reloads the new image. I want the old image to fade and the new one to fade in. jquery $('#portfolioLeft a.thumb').click(function() { var thumbId = $(this).attr('id'); $('#portfolioRight #portfolioMac img').fadeOut('slow'); $('#portfolioRight #portfolioMac img').attr('src', 'img/port/lrg/' +thumbId+ '.jpg').fadeIn('slow'); }); html
Jquery script failing only for IE8
I am using jquery (1.8) to load data into a division using ajax. The data returned by the first ajax call is a set of html radio choices, followed by an empty divisions (say 'packagelist'). Clicking on any of these radio options makes another ajax call (function processSubgroup) and the html data returned by this call is to be loaded into the previously loaded division 'packagelist'. My jquery script is as follows.... function processSubgroup(url, val) { $.post( url, {value:val},
How can I select a dropdown list in a specific table cell?
Hi, I’m using JQuery version 1.8.11 with IE10. I have a table with a simgle row. the table id is #listTable, the <tr>id is #listTableRow and the <td> id is #days. The row has a number of cells and in each cell there is a dropdown list with the same id: #searchString. I want to be able to select the the dropdown list in the third cell and set its option to option:first.. I’ve been able to select the td with the code below but not the specific dropdown list.. How can I select the 3rd dropdown list
Review copies available for Instant jQuery Drag-and-Drop Grids How-to
We have a few e-copies of Instant jQuery Drag-and-Drop Grids How-to (http://www.packtpub.com/jquery-drag-and-drop-grids/book) available for review. If interested, just drop a line in the comments below with following required details: 1. Email address 2. Choice of website for posting your book-review (can be your blog or website, Amazon.com or goodreads.com) Instant jQuery Drag-and-Drop Grids How-to is a short, fast and focused guide on implementing amazing drag-and-drop layouts for websites
Review copies available for Instant jQuery 2.0 Table Manipulation How-to
We have a few e-copies of Instant jQuery 2.0 Table Manipulation How-to (http://www.packtpub.com/jquery-2-0-table-manipulation-how-to/book) available for review. If interested, just drop a line in the comments below with following required details: 1. Email address 2. Choice of website for posting your book-review (can be your blog or website, Amazon.com or goodreads.com) Instant jQuery 2.0 Table Manipulation How-to is a short, fast, focused guide on editing and manipulating your HTML tables.
Scrolling on Mobile Safari
I'm developing a website and I need the browser to scroll to an anchor. It MUST be animated, so I tried to use jQuery for that. Tried this: function goToByScroll(id){ $('html,body').animate({scrollTop: $("#"+id).offset().top},'slow'); } It works perfectly on Firefox and Safari(on the Mac). On Mobile Safari it first goes to the top of the page, then it scrolls to the anchor I want it to scroll to. What's the trick to make it work? Thanks in advanced!
MakeScrollable function for an image
Hello everybody, I'm trying to improve my website which you can find here : Here . As you can see, you can decide the image format between 3 options: Fit (will fit the screen), Normal (Normal size image) or Full (yeah you know). My problem is that i want to make the Full (and the normal when it occurs) image scrollable. I tried to use the makescrollable function but it did not work. I found a website using full background scrollable picture, exactly as i want -> Here The original project can be find
The best way to filter 315 pieces of data
I have some tables with 315 unique prices which can be filtered by Thickness, Size, Color, Quantity - I am looking to just return the price based up user form selections. At first I thought about creating 315 items in an array like this and filtering using grep()... but now I'm wondering if this is the best method.... {"data": [ {'th':'5','dm':'1','col':'1','quan':'50','price':'4.07'}, {'th':'5','dm':'1','col':'1','quan':'100','price':'2.18'}, {'th':'1','dm':'1','col':'2','quan':'50','price':'4.92'},
How to call an element of the "root" document from a nested html code?
Hey! I've a PHP page that imports a menu bar throught an external html code. Something like this Panel.php <?php include("sideMenu.html"); ?> <div id="proof"></div> I want to place in sideMenu.html some jQuery code that can interact with the "proof" div.. How i can do that? I think that we can call Panel.php a "root" element, right?
ajax post-request, longer strings are not transmitted
Hey, i try to transmit some text from a html-textarea by an post request. When the content of the textarea exceeds roundabout 500 characters (this isn't a very long string...) then only an empty string ist transmitted. I already checked the server-settings, they seem to be ok! When you take a look at the code, then you see two forms, form "mailform2" sinple transmit the content with a submit button without ajax. Then everything is fine and even veeery long strings are transmitted, so i believe it
Apple iOS .animate() Horizontal Page Scroll Bug?
I have an entire responsive page that scrolls both horizontally (it's horizontally scrollable to 300% of the visible window) and vertically (lets say with the click of a button perhaps for ease). On apple mobile devices, when I attempt to do a horizontal .animate function the vertical scroll always resets to 0 (the top of the page) - while the horizontal scroll works just fine. I've even tried to set scrollTop to a given position within the animate, and it still does the same thing. I can't seem
Creating a simple jQuery image slider
I am in the process of creating a simple image slider. The script works however it loads the second to last and last image/text at the same time on top of each other. It then takes about 7 seconds before it seems to oad the code and work. http://project.josephmanning.com/jm Is the temp site while I develop the site. HTML <div id="homeSlider"> <div id="sliderWhole"> <div id="slideShow"> <div class="slideContainer show"><div class="textHover"><span><h5>O'Riada-McCarty-Manning Academy of Irish Dance</h5>Built
Jquery not working at all =/
I looked through a few threads but couldn't figure out why my script isn't working =/ I decided to test out something simple with Jquery before trying to build my portfolio. This is my script: HTML <!DOCTYPE html> <html> <head> <title>Portfolio</title> <link rel='stylesheet' type='text/css' href='stylesheet.css'/> <script type='text/javascript' src='script.js'></script> </head> <body> <div class ="topbar"></div> </body> </html>CSS .topbar { height: 100px; width:
syntax of a function ...
I state that are in the course of learning do jQuery ... There are thousands of tutorials to write functions in a thousand different ways in file .js external... Someone can give me a hand? // Do something when the document it's ready (at the end) ...Correct? jQuery(document).ready(function(){ alert(' I am ready '); }); // The document learn the function and when it is called do something ... Correct? function hello() { alert(' hello '); } But I don't understand what it means: jQuery(function($)
Next Page