Disabling Mousemove Scrolling?
Hey everyone! I am making a website and am having a key issue. The site uses an image gallery script that sets the thumbnail image as the background of the page and enables the user to see the various parts of the image by moving their mouse across the page. When they click a thumbnail the navigation and thumbnail images disappear as well and are reappear via a "view thumbnails" button. What I want to do is disable the mouse moving scrolling when you click the view thumbnails button as well, but
Generating random aswers data for multiple choice tests form the question/ answer pairs.
Hello i would like to use the following list as a template for generating multiple choice tests. <ol > <li > <p>QUESTION</p> <ul id="ula"> <li class="correct">CORRECT ANSWER</li> <li class='inc1'>incorrect</li> <li class='inc2'>incorrect</li> <li class='inc3'>incorrect</li> </ul> </li> </ol> I store test data the following way: <div id='cont' style="display:none"> <span ><h3 class="q" id="q1">question1</h3><h4 class="a" id="a1">answer1</h4></span> <span ><h3 class="q" id="q2">question2</h3><h4
jquery Multiple File upload Plugin
Hi , I am using JQuery Multiple File upload Plugin ..Is there an way to pop an alert message with the number of files he/she has selected after clicking submit button to submit files.. Thanks in Advance.. Kiran
How can I call a method from my current class using keypress ?
Hello, I have the following code in one of my pages. My problem is caused, because the method "processEvent" is never called, but I have no idea why. I guess it is broken, because I don't relay the "this" object correctly. Any ideas? <script type="text/javascript"> var MyClass = function() { this.init = function() { $("mydiv").keypress( this.processEvent ); } //////////////////////////////////////////// this.processEvent = function( event ) { // Something
Show different image on hover
Dear JQuery peeps, I'm having some trouble with the following construction. I have a worldmap image with an image map where you can hover over a few countries. When you hover over a country a pane will slide down and show an image about the country. Now this is all working well except for the following. When you hover over a country and quickly hover over another the pane will slide back up and after the slide it will slide back down. All well except for the problem that the image change will start
.append() does not insert the closing tag, WHY?
Hy everybody, if i use this code: var liTemplate = '<li class="ui-state-hover">' + '<div class="imageDiv" style="background-color:#d2ca68; background-image: url(uploads/' + sessionObj[i].imghash + sessionObj[i].thumb + '.' + sessionObj[i].ext + ')>' + '<div class="delButton">' + '<img class="delImg qq-upload-cancel" src="images/close_button_red1.png">' + '</div>' + '</div>' + '</li>'; $('#unsignedList').append(liTemplate);The
Problems trying to pass an array
Okay I have some PHP code that currently works by; creating an array 'values[indexed by ID's of packets]' as the name tag in the form below. (forget the syntax ive removed alot to fit in this post) the important thing to see if Input Types are in a loop at there can be any number of them, the text fields are put in an array which is indexed by $packet['piid'] <?php foreach($packages as $packet):?> <input
Conflict between my jquery Nav and Fancybox
Hi All, I have a website which uses jquery for the nav and then i also want a fancybox pop up within this page. There seems to be a conflict between the Nav and Fancybox but im unsure how to fix it. the page is here... http://bit.ly/h2YLsN and the link is the Make a booking link. please if someone knows how to fix it i would be very greatful. thanks Craig
blank page on firebug?
Hi guys I run these codes below on firefox with firebug and the page goes blank? By the way I run the codes on safari without firebug and i see the page. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script language="JavaScript" src="js/default.js></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
Trouble with DOM traversal.
I am trying to write a function that will allow me to capture the ID of the next target down the dom to the span that is clicked. Assuming the class of all the target containers is "target" Given this <wrap1><span1><span2><span3></wrap1> <target></target> I can use span3.parent().next("target").attr("id") to get the ID of the target element Given this I can't figure out how to do the same <wrap1><span1><span2><span3></wrap1> <wrap2> <target></target> </wrap2> The biggest part of the
Enabling disabled button does not refresh correctly
I am disabling an input button on my data entry form until all of the data validates correctly. When I enable the button it does not always display the same as the Cancel button that was not disabled. I occasionally appears as though the mouse is hovering over it. I have discovered that if I tab to the button or if I hover the mouse over it, it then displays OK after I tab to the next button or move the mouse off of it. This is the html that defines the button. <input type="button" id="submitButton"
AJAX jsonp entity issue
I have a jQuery AJAX request that pulls jsonp data from another server. This data is passed to a callback function, and then the data is appended to a div. When viewed in Firebug, data appears as entities (as it is encoded in jsonp): <p><strong> but when viewed in the browser window, the HTML is displayed, rather than being rendered: <p><strong> I'm a bit confused, shouldn't the browser render entities as usual, or is there some type of additional processing required in jQuery when returning
$.getJSON URL Properties
Hi, I am having trouble with the .getJSON method. When I use the flickr URL given in one of the examples, it works just fine. However, whenever I try to capture my own JSON, it hits the .error method. Here is the call to getJson: var jqxhr = $.getJSON("http://localhost:5002", function() { alert("success"); }) .success(function() { alert("second success"); }) .error(function() { alert("error"); }) .complete(function() { alert("complete"); });I have a homemade TCP server
$.ajax – little help needed
Guys, I’m trying to make $.ajax work (jquery-1.5.js – the most stable ;-) – no luck at all. Getting completely different behavior in FF and IE The page in on localhost (http), getting cross-site request via $.ajax (http, https) (what could be simpler than that?) IE8 – works for http IE8 – access deny for https FF – send OPTIONS instead if GET request for both http/https Code snippet: jQuery.support.cors = true; // force cross-site scripting (as of jQuery 1.5) $.ajax({
if field1 blurs or field2 blurs in same statement
hey guys im wodering how i would run a script only if field or field blurs like $('#field1').blur(function() { });but with both in a OR statement? if somewould could tell me how that would be great thanks
fadeIn() CSS proplem
hey guys im using the fadeIn() function in my script but when using it i've noticed it puts a style on my break, input and label tags style: style="display: inline;" using fadeIn() : $(input_field).appendTo('div#' + selector).hide().fadeIn(1200);html output: <label style="display: inline;" for="game_types2">Game Type - Name 2 : </label> <input style="display: inline;" id="game_types2" name="game_types2" value="" type="text"><label style="display: inline;" for="game_types_abbreviated2">Game
Multiple Images
Hello All, I am new to this forum... hope everyone is well. I have a question with regards to using fancybox/jquery within my dynamic php site. This is my htmp/php code... // <a id="example6" href="uploads/originals/news/<?php echo $rows['news_photo']?>"><img src="uploads/120x72/news/<?php echo $rows['news_photo']?>" alt="example6" width="120" height="72" class="friendpicsborder4" title="view larger pic" /></a> // This is my jquery code... // <script type="text/javascript"> $(document).ready(function()
ajax subdomain cross domain issue after upgrading to jquery 1.5
After upgrading from jQuery 1.4.2 to jQuery 1.5.1, I'm getting a "No Transport" in ie8. my website at http://sub.website.com is trying to access http://website.com/service.asmx. I understand this note, Due to browser security restrictions, most "Ajax" requests are subject to the same origin policy; the request can not successfully retrieve data from a different domain, subdomain, or protocol. However I need to solve. Is there a way to override the ajax handling to allow subdomain request as
$.post / php json_encode issue
I am serializing a form and sending data via $.post to a php file that is encoding the processed data in json format. However, my response data keeps coming back wrapped in html <p>data...</p>. Thus, an error is thrown as the tags make for invalid JSON. I'm clearly missing something, but I can't figure out what. Any clues?
Modal Box Background div not filling entire page
I have developed a modal image box which is working as desired except for one thing. I can't get the background div to cover the entire window background when the backgroud extends beyond the visible window size (requiring vertical scrolling). The background will only fill to the size of the the visible window area. If I scroll the window while the modal box is showing the lower area is exposed. I have the background div height set to 100%. I have tried min-height: 100%. I have also just made
jQuery Inline Edit
I’m trying to get the QuickEdit code below to work with IE…it works fine with FF. Anyone able to help? <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> (function($) { $.fn.inlineEdit = function(options) { options = $.extend({ hoverClass: 'hover' }, options); return $.each(this, function() { var self = $(this); var id = $(this).attr('id'); self.value = self.text(); self.bind('click', function() {
Accessing the div inside a Div
Currently I have one issue where i have defined my four input tags inside a div. Now the issue is arising that i need to separate them each using the table tag or either the nested div tag to make their width.. currently my show is like this <div class="row"> <input type="text" id="text2" name="text2"/></br> <input type="radio" name="text2Radios" value="1" class="ToBeED"/>1 </br> <input type="radio" name="text2Radios"
How to get accordion height
I have menu which works like accordion, and there is background in body, when all accordion <ul> opens then accordion overlap the background image, ie. the body height must resize. Here is link. http://rd.navsarawebstudio.com/job1 Try Objects > object1, Object2 , object3 (open all) and see at bottom. please help me. I tried to get height all visible li as it opens but allas.
functions scope.
if i have a function... function alert_function(){ alert('dave'); } I can call this function from any other javscript code i write... however if i wrap that funciton within a $(document).ready() function alert_function(){ alert('dave'); } }) I can no longer trigger that function from external javascript... how can i make it so that i can still trigger that function from external scripts.. kind regards J
[jQuery][validate] Getting duplicate error messages after plugging in UI and setting classes
Having got my basic validation working I then set about putting it into some nice UI. On either success or failure it always appends to the error message without removing the old message, so it ends up with a string of messages for each of the fields. The validation looks like this: jQuery.validator.setDefaults({ errorClass: "error ui-corner-all ui-state-highlight", success: "valid ui-corner-all ui-icon ui-icon-circle-check", focusCleanup: true }); $(function(){
ajaxSuccess, but myfuncttion executes first problem
I have a function like: function doWorkForJobCreate() { $.ajax({ url: 'myurl', success: function (data, status, req) { if (!processFKErrorHeader(req.getResponseHeader("fkerror"))) return; doJobs(); } }) } i should use processFKErrorHeader, if parameters exist, authorized etc. and should do for my each ajax to my server(now i have about 50). i want to do this from single point like ajaxSuccess. But the problem is ajaxSuccess execute after my function
Slide up, replace contents, then slide back down
I'm trying to do a flashy slide up, then use $.post() to load new information into the element, then slide it back down. The problem I'm having is actually twofold. Here's my code: $('a.comments-link').unbind('click').click(function(e) { var $s = $(this); e.preventDefault(); $s.parent().parent().slideUp("slow", function() { $.post('ajaxtest.php', function(data) { $s.parent().html(data); }); }); $s.parent().parent().slideDown("slow"); }); First, if I put the slideDown
keep the focus on all emelemnt containing the tabindex attribute?
hi there, i want to keep the focus on every element which has the tabindex attribute, avoiding to submit the focus to the adress-bar of the browser window aso... that means i'm trying to achive some kind of loop-through-functionality, when i'm pressing the tab key i want to step throup all elements containing the tabindex-attr, the last element should submit its focus to the first tabindex-element... any hints, ideas? i'm using the google hotkey-plugin (http://code.google.com/p/svg-edit/source/browse/trunk/editor/js-hotkeys/jquery.hotkeys.min.js?r=1201)
Showing a random list element depending on it's attribute's value
Hi guys! I have a page which contains an <ul> list with 5 items. Each of those items has a data-weight attribute which corresponds to its importance in the list. I have to make only one random list item appear and use the weight to make sure that the most important one shows up more often than the least important item. Does anybody has any idea? Thanks in advance!
Syntax Error Help
Hello, I keep getting the error message below using IE8 browser. I tried fixing and researching all week with no luck. Any help is much appreciated? Error: Message: Exception thrown and not caught Line: 3291 Char: 2 Code: 0 URI: http://stoodo.com/components/com_community/assets/joms.jquery.js Line # 3291 error is the second line below ("Syntax error, unrecognized expression: " + msg;) Sizzle.error = function( msg ) { throw "Syntax error, unrecognized expression: " + msg;
Problem with variable containing html from json call
Greetings, I have a slight problem when trying to select the href element of an a tag, in html contained in a variable. The variable contains html returned from a json call. <script type="text/javascript">// <![CDATA[ $(document).ready(function() { $.getJSON("http://www.xxxxxx.dk/admin/admin?func=searchViaAjax", { thingId: "Y_3cB3qZ4rFgfPKlOk8wiw", }, handleJson ); function handleJson(data) { var array = data.searchResult_loop; var fieldsMessage = ''; var fieldsData = ''; var
XML List Items
I'm having a little trouble following this tutorial and wondered if anyone can help? http://think2loud.com/using-jquery-and-xml-to-populate-a-drop-down-box/ Basically, he's creating drop down lists, but each item (even though its a subset) is organized on the same tree level of the tree. <option> Parent <option> Child 1 <option> Child 2 ... instead of <optgroup> Parent <option> Child 1 <option> Child 2 </optgroup> .... I'm trying to do something similar with <ul><li> elements, but the
Using datepicker on fields generated by javascript
I'm writing a page where I'd like to generate a bunch of fields using javascript and then make them usable by datepicker. The problem I'm running into is that when I first click on one of the javascript generated fields, datepicker doesn't load. However, if I click on a second instance of that same field name, then datepicker will load properly. My guess is that I'm just defining the function incorrectly for these events. A stripped down example can be found here. Thanks in advance! Michael
Removing removeAttr() and adding ? href.
Hi, I'm looking to remove an "Href" from a link, but add it back later. So <li class="home"><a href="#">Some Click Through</a></li> "$('.home a').removeAttr('href');" would remove the href, and the link wouldn't click through, but when I need it to click again what do I do? Do I use attr() some how? Thanks for any help.
How to get event.target after keypress?
I have an iframe with designMode="on" and have to listen to keypress event and report on what element was keypressed (for example div, or span and so on). But e.target.nodeName show only 'html' here is example: http://jsfiddle.net/fJLTG/When I click on word "Hello" - I get "div" - it's correct, but when I keypress on it - i get "html" instead "div". How to fix this?
How to select all <a> withid a <div>?
Hi all, Let's say I have following HTML <div id="myDiv"> <table> <tr> <td>text 1</td> <td><a id="myId" name="Name1">Edit</a></td> </tr> <tr> <td>text 2</td> <td><a id="myId" name="Name2">Edit</a></td> </tr> <tr> <td>text 3</td> <td><a id="myId" name="Name3">Edit</a></td> </tr> <tr> <td>text 4</td> <td><a id="myId" name="Name4">Edit</a></td> </tr> </div> How can I use jQuery to select all <a> with id="myId" within that div? Is the syntax correct? $('#myDiv :a[id=myid]').live('click',
problem IE6 chanche src image
post the code: var ppt_ita=new Array(<?php echo $array_pdf_ita; ?>); var ppt_eng=new Array(<?php echo $array_pdf_eng; ?>); function attiva_slider(){ $("#img_slider").append("<img src=\""+immagini[0]+"\" alt=\"\" width=\"539\" height=\"431\" />"); $("#ajax_loader").fadeOut(); $("#scarica_img").attr("href", immagini[0]); $("#scarica_ppt_ita").attr("href", ppt_ita[0]); $("#scarica_ppt_eng").attr("href", ppt_eng[0]); controllo_navigatore(i); $("#indietro_img_slider").click(function(){
jquery solution only works in safari
Hi, This navigation solution only works in safari, I thought jquery works the same way in all browsers. http://notre.co/nav/ Is there a easy fix or do I have to find another way? Big thanks from sweden!
Closing .load Dialog fails
Hello, i've git a Problem. Everytime i test to close a .load jquery dialog, nothing happens. Hers the Code: function contentloaderBea(dataid) { $("#somediv").load("Mieter.php?s=mbearbeiten&mieterid="+dataid+"").dialog({ modal:true, autoOpen: false, title: 'Mieter Bearbeiten', position: 'center', width:'500', height:'300', buttons: { "Save": function() { $("#bearbeiten").submit();
How to attach incremental numbers to the class with increase after nth element ?
Hello I am a beginner and have a question: i have the following div: <div> <span class="a"> some content</span> <span class="a"> some content</span> <span class="a"> some content</span> <span class="a"> some content</span> .. etc </div> I would like to attach dynamically incremental numbers to the span class with increase after nth element . For example number increase every 3 items: <span class="1a"> some content</span> <span class="1a"> some content</span> <span class="1a"> some content</span>
Next Page