getting the next 'select' item
Hi, I have a little problem with getting the next 'select' item in a table. I have my html code like so: <td><select name='client' id='client' onchange="populateProjects(this)"> <?php foreach($clts as $row) : echo "<option value=".$row->client_id.">".$row->client_name."</option>"; endforeach; ?> </select> </td> <td><select name='project' id='project'>
Urgent Help with Jquery Slide Show
I have spent the last 52 hours on and off trying to figure this out. I want to display a sideshow on my website and below is the code I used. I uploaded the code and it show a blank page. The following are the .js files I also uploaded on the server: jquery-1.2.6.min.js jquery-1.3.js jquery.cycle.all.js jquery.cycle.all.min.js jquery.cycle.js jquery.cycle.lite.js jquery.galleryview-3.0.js Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Dragging - change the slideshow image, howto?
Am trying to make slides changes on mouse drag. Can anybody point me, maybe is any one working slide show? Need slides be changed without effects, just one after another ... Basicly - want click one button of slideshow on drag left, another - on drag right ... Thanks you All!
Loading the genarated head of a php page with help of ajax
Hello everybody, could anybody tell me, how to load the head of some php page per ajax. I need this cause i'm using a cms. And if i do not reload the new generated header on my page, some functions which uses javascript, doesn't work properly. Please help me! regards dennis605
Passing Created Table Row and Data back from ajax call
I am trying to figure out how to pass the html back from an ajax call let me give a couple snippets jquery call <script> function add_reminder_row(){ var rrr=confirm("Please Confirm Reminder Addition"); if (rrr==true) { var MyData=''; var db ="<?php echo $_SESSION['db']; ?>"; MyData=MyData+'db='+db; var debug="0"; if(document.getElementById('debug')){ var debug = (document.getElementById('debug').checked==true ? "1" : "0"); }
Grabbing span value
I have the following code, it's a custom drop down menu... I want to check that the value is not empty, how do I grab the value between the <span> tags? I tried this but it no worky... var storeType = $('store_type_list dt a span').html(); <dl id="store_type_list" class="dropdown_store_type"> <dt> <a> <?php if (isset($_SESSION['tmpStoreType'])) { echo '<span>' . $_SESSION['tmpStoreType'] . '</span>';
Not serializing my forms data
I have no idea why its not serializing my form's data. <?php require ('php/bios.php'); ?> <script type="text/javascript" src="forms/edit/js/bios.js"></script> <!-- Title --> <div id="title" class="b2"> <h2>Character Management</h2> </div> <!-- Title --> <!-- Inner Content --> <div id="innerContent"> <form action="#" id="bioForm" > <?php while ($row = mysqli_fetch_array($groupsResult, MYSQLI_ASSOC)) { echo "<fieldset> <legend>" . $row['groupName']
mininification and license blocks?
Ive been experimenting with minification engines (jsmin - the php build) that can serve up minified js/css to the broswer on the fly. I have all jQuery UI widgets/interactions/effects as separate files. I am them having my backend scripts combine the neccessary ones I need for a page, minify them and then send them...There by limiting the number of http requests and size in general. ...I don't need the whole UI suite if I'm simply using one or two effects or widgets. - ya know? The problem is
Unique slider, but can not figure out how its made.
Hi guys, to start off please note I am a noob at jQuery. I can implement a plugin (not overly difficult ) and make very minor changes, but get lost very easily. Therefore, I am turning to you guys to see if you can set me straight. I've come across a very unique slider and I am interested in how it is built. I've scoured the web and can not find a pre-made slider like it. I have found similar "sliders" and mucked around with them, but don't come close to mimicking the effect. The slider I am looking
jQuery-1.2.6.min.js - Internet Explorer error
Hi I hope someone is able to help me or point me in the right direction. Using Coda slider - which works great in Firefox but noticed in IE8 it's showing an error on the page: Invalid Argument jQuery-1.2.6.min.js Code: 0 Line: 12 Char: 2299 [Path to js file] Here is a copy of the markup in the HEAD that calls all the JavaScript files: <script type="text/javascript" src="<%=SiteRoot()%>include/jquery-1.2.6.min.js"></script> <script type="text/javascript" src="<%=SiteRoot()%>include/jquery-easing-1.3.pack.js"></script>
Problem with calculation
<script language="JavaScript" type="text/javascript"> $(document).ready( function() { $(".chkOptions").click( function () { var ntot = 0; var multiplier = $('#multiplier').val(); var ans = $('.chkOptions').val(); $(".chkOptions:checked").each(function () { ans = multiplier * ans; ntot += parseInt($(this).val()); }); $("#txtSavingsTot").val(ntot); })
Problem Mouseenter
I want to do like that i have a center point , when i hover mouse to left of that point , slider will move left , and same with right var margin = $("#viewer").offset().left; padding = $("#viewer").width()/2, m = margin+padding; $("#viewer").mouseenter(function(e) { var te = m-e.pageX; $('#slide').animate({left:"-="+te+"px"}) ; }); And <div id="viewer"> <div id="slide"> <img id="image1" class="current" src="21.jpg" alt="Amstrad CPC 472">
Issue with XML and jquery
Hi, I have a list of records where I want to be able to click on each, edit them then update the database with edited record. When I click each 'ID' field, it should search the database with 'where ID=$_GETID' and create a XML record with each column. I managed to get a similar function working a few weeks ago, but I cannot understand why the hell this will not work! Jquery: $('#manage_tasks_box').find('#manage_tasks_box_table').column(0).click(function() { var ID = $(this).text(); //alert(ID);
Watch for a sibling frame to be reloaded?
I have to insert some HTML into a frame in a frameset page from another frame in the frameset. frameA - I need to know when this frame is loaded frameB - jQuery here to detect when frameA loads Due to maintenance issues there is no way to simply run code from the pages loaded in frameA. So far I have $(function() { $(frameA).load(function(){ alert("Hello!"); }); }); But this only alerts the first time the parent page is loaded. Working with these constraints, what is the correct way to do something
Passing variable into YQL statement
I'm having a tough time trying to add the "zip" variable to my YQL statement. var zip = $(this).attr('zip'); $.YQL("select * from rss where url='http://weather.yahooapis.com/forecastrss?p=' ' "+ zip +" ' ", function(data){ var w=data.query.results.item; $('.temperature').append(w.condition.temp+"°"); }); I've tried as many different ways as I could imagine. Simply putting the literal zip code in the query works perfect. I appreciate any help. Thanks!
Copy certain text from one div class into another div
Hi, I want to be able to copy certain text from one div into another div. The text is generated from a Wordpress Plugin, and it generates 2 different divs, with the following classes 1 called .voting inactive and the second one called .voting. The text generated is rating based is it will look something like: Rating 4.5/5, i ONLY want to take the 4.5 or whatever vote is generated and copy that into a div to display the result nicely. Pic is attached :-) Any help would be great, Thanks Paul
ANIMATION "HALF PIE" ELECTIONS
I need to make an animation of a "half pie " in js Here you can see as I did in Flash: http://www.elperiodico.com/es/elecciones-28n/ And here in JS: http://especiales.elperiodico.com/LABS/ELEC2011B/html/emi-basic2.htm But I can not create the animation from left to right as I did with flash. Some kind soul can help me:) Thank you very much Agustí from Barcelona
Problem with .each() and coloring labels...
Hello, I am having a problem a jQuery function I am working on. I want the function to scan all the inputs on a page, and if any are checked, set the corresponding labels bold. Here's a working example: Click Here Also here's my code pasted directly: <!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="http://www.aurorafxstudios.com/_global/includes/jQuery/jquery-1.5.1.min.js"></script> <script type="text/javascript"> function setStyles()
Loaded elements are not affected with jQuery
Hello, I have a little problem. I'm loading some data using .load() function. I'm loading form data too, but those forms are not interacting with jQuery (they're proceeded with .ajax() function with return false - page shouldn't be reloaded, but it is and no data are sent). Any idea how to figure it out?
Moving a table to make it relative to a <span> with an ID
Hi guys, I've got an example here: http://jsfiddle.net/gz6Dv/5/ This is a setup for a product listing within a table. I wish to move the <table> with id="item_Tbl" relative in position to the <span> id="tablerelative" so it's positioned either above or below this span. I'm guessing this may not even need javascript it maybe just a CSS change? But either method is welcome as a response? Thanks
jQuery and selectors, I always seem to struggle.
Heey there jQuery community :) I have a problem, which I hope you can solve. I'm using jQuery this time to create a dropdown menu. Here is my html code (partially, only the relevant part): <table> <tr> <th><a href="#">Info</a></th> </tr> <tr><td>Products</td></tr> <tr><td>Prices</td></tr> <tr><td>Location</td></tr> <tr><td>F.A.Q.</td></tr> </table> Here is the relevant part of the css: td { display: none; }Now what I want should be obvious: When you hover the <th>, the other <td> should display,
Method Anonymous returned from a tag onclick - need to modify it!
Hi, I'm trying to manipulate a function-call that's sitting in a <a>-tag's onclick event. I'm at the point where I've done the following: var $addNew = $("#someID"); var oldUrl = $addNew.attr("onclick"); var $newUrl = $addNew.attr("onclick"); $newUrl = $newUrl.replace('return false','return true'); The last line raises an exception ('Object doesn't support.....'). I've noticed when doing an alert on $newUrl (before I try the replace) that jQuery adds 'function Anonymous' around the code. I suppose
A problem with using .dialog box
Hello, I am calling the dialog box from a form. The dialog opens another form. I need to send the dialog box parameter of values being captured on the first form. Because the dialog box is being called on: document.ready, I can't get the values being capture on the first form. document.getElementById is empty since on document.ready, the user didn't capture anything yet. Is there a way to call the dialog box on: onClick and not on document.ready? Thanks, Sigal
Using jQuery to hide divs; this isn't working at all for me.
Well, this is my first post and my first impass with jQuery. So far I have been able to figure everything else out myself, but this has perplexed me. I have a website that I am trying to keep minimal and I am relying on jQuery to change the content in a div that represents the content of the site. so I have this that makes up the menu system. $(document).ready(function(){ $("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after
Assigning classes to visible li elements only, and changing dynamically
I'm putting together an events calendar at http://609vibe.com/events-calendar/ Each event is a li item, and I use jQuery to assign the class "no-left-m" (no left margin) to li:nth-child(3n+1) for CSS layout purposes. I've also added the ability to show only events in certain categories. Unfortunately, the initial jQuery assigns the classes to li items from the DOM, and doesn't take into account the show/hide. This means that when I show only a single category, the margins are off. I've tried the
CheckBox event
Hi, i am using a simple alert to see if i can attach a click event to some dynamically created input controls. so far without success... can anyone see where i'm going wrong? The page renders fine and behaves correctly except without the click events. thanks. @model RM.Mobile.ViewModels.Attendance @{ ViewBag.Title = "Attendance List"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2> Your Class</h2> <script language="javascript" type="text/javascript"> $(document).ready(function () {
How to hide list item based on attribute
Hello All -- I'm pretty new with jQuery and have run into a road block on a project. I have created a product finder that filters an unordered list by 4 criteria. Criteria 1 is a buttonSet, Criteria's 2 - 5 are sliders. When the page initially loads the entire unordered list is shown in the results panel. The buttonSet is a click function to remove, then add the 'selected' class. When a button is clicked only the list items that match the shape attribute are shown. The problem that I am having is
a very strange action after using getJson function of Jquery
Dear All, I found a very a very strange action after using getJson function of Jquery, pls see code as below: function checkCode(o) { var randomcode = ""; $.getJSON( "/Handler/GetCodeHandler.ashx", function (json) { $.each(json, function (i) { randomcode = json[i].code; }) }); //the result of below line is alway false even these two values are same, if use alert function before it, it will work well, hope anyone can help me:) if (o.val().toLowerCase()
Wobbly Windows
Hi all, I was just wondering if it's possible to code a script in jQuery which acts just like the wobbly plugin in Compiz? If so, can somebody please give me an algorithm example so I know how to program such a script. Thank in Advance - Michael
toggle display and parent height problem
I have a setFooter function that's called on load which pins my footer to the bottom of the window if the page content is too short. It does this by stretching #content's height if necessary. This works great. But I have some pages that include a link that, when clicked, toggle the display state of a div. This div is inside #content. Because setFooter writes a height style into the #content div tag, when the toggle div opens, although the window gets taller, #content doesn't stretch and footer remains
Cookie in show/hide toggle div
My script: function ShowHide(){ $("#news1").animate({"height": "toggle"}, { duration: 250 }); } Question: How can I insert a cookie to this, so that when I hide it, it will remain hidden after refreshing the page. Appreciate...
Building something somewhat unique
I am looking to build a jquery cycle-like interface that is essentially a jquery slideshow with a basic navigation. However, the navigation needs to be dynamic. It needs to only show the navigation items that are NOT being displayed in full view of the slideshow. For example. If i have slides A, B, and C; if B is being displayed then only thumbnails A and C would be displayed on the navigation. Another thing is animation. When a user selects a slide thumbnail then the thumbnail needs to animate off
Load cookie and remove disable attribute
I have a form with some select option like <select name="chart" id="chart"> <option>Google Chart</option> <option>Flash Chart</option> </select> <select name="typeo" id="typeo" disabled="disabled"> <option>Line Chart</option> <option>Pie Chart</option> <option>Bar Chart</option> </select> Actually typoe options are created by json. After selecting chart it varries for google chart and flash chart. I have disabled typeo and using jquery to enable it so every user select every necessary options. I
variable and .html
Hello, This is my code: var test = "<div id='d1'>text1</div><div id='d2'>text2</div>"; var value= $(test +" #d2").html(); alert(value); Please tell me now, why alert() return's me "text1"? How to make it return "text2"?
Using the dialog box
Hello, I have looked at all your examples on how to use the dialog box but I still have a problem. I am calling the dialog to open a from, this form needs to get parameters from the page that opens it and send them back to the page after submitting the form to the database. The problem I am having is that the dialog box is being called on document.ready and the fiels on the page are not filled in yet, so: document.getElementById is actually empty. To make things a bit more clear: I have a form with
dialog box
Hello, Is there a way to call the dialog box not on document.ready but when a button is clicked? I need to open a form dialog from a form page. When the dialog form is submitted, I need to go back to the previous form and keep all the values that were captured there. My problem is that I've tried to use: document.getElementById but those are all empty when the document.ready is being called. Thanks, Sigal
bind or live with option
Hi, I don't understand how to make some option and use bind() ou live(). If I write : $('.text').droppable({ hoverClass: "ui-state-hover", accept: "#liste li", drop: function( event, ui ) { $(this).insertAtCaret(ui.draggable.text()); } });how to bind this droppable and conserve hoverclass or accept ?? I can only make : $('.text').bind('drop', function (..........loose my options ? or i miss something ? thank
Custom Error messages and Ajax
I have a form with different products with a Qty textbox and submit which will then call ajax and add to the basket. I want to know how to do the following: Check the database for number instock create custom error message based on 1. How can i place the error message anywhere i like. Finally the tutorials on here arent very good. does anyone know of a really good website to teach me from scratch? Cheers
Customizing inline style script generated
Hello there, I embedded an external script to my website which output is generated on button click. This script creates inline styles which I would like to customize. I thought of doing so by adding ... ... $('#submit').click(function() { initialize(); $('#divID div table').css("background-color", "#000"); } ... ... after the call of the function but it seems not to have any effect to the script generated inline styles. How can I control that? Many thanks in advance!
animating on hover textshadow with csshooks
hi, i'm having an issue with this piece of code - can't get it to work right. i'm using brandon aaron css hook for textshadow - thanks ! $(document).ready(function() { (function($) { var props = "Color X Y Blur".split(' '), support = $.support, rWhitespace = /\s/, div = document.createElement('div'), divStyle = div.style; support.textShadow = (divStyle.textShadow === ''); div = null; if ($.cssHooks && support.textShadow) { $.each(props, function(i, suffix) { var hook = 'textShadow' + suffix; $.cssHooks[hook]
Next Page