Shoping Cart SORTA!
Hi, I was woudering if anyone know of a plugin that works as follow: When you type in a text field each chacter repersents a value which is added up with JQuery? So for example if i types 'HELLO' and if each chacter had a value of 1 then end result would be 5. Any help would be amazing!
Quick Ques...
The .live() technique is useful, but due to its special approach cannot be simply substituted for .bind() in all cases. Specific differences include: [...] To stop further handlers from executing after one bound using .live(), the handler must return false. Calling .stopPropagation() will not accomplish this. What does this actually mean? A click event bound to the same element wouldn't work if return false is set in the live code? I'm using .live() and it doesn't make any difference and there
Populate 2 dropdownlist from SQL server Database in Asp.net
Hi all, i'm a beginer in Jquery I have a dropdownlist called ddl_Province with items are all provinces of my country. when i select an item in ddl_Province it populate dropdownlist called ddl_District with items are district of Province selected in ddl_Province. Can you help me to do it with Jquery in Asp.net. Thanks so much
$.widget( "ui.combobox", {
Hi All, I am looking at the code for Autocomplete code. What does this do: $.widget( "ui.combobox", { ... }); Thanks for any advice! Rob :)
error handling with jQuery
Hi there, I have a question concerning error handling in JS executed in the jquery environment (including jquery plugins). Normally I can use try and catch to handle errors in JS, I can even throw errors at certain occassions. In native JS this works perfect for me. But as soon as I execute JS within $(document).ready or within a jQuery plugin I cannot catch any errors - neither runtime errors nor thrown errors. I found some information about jQuery.error(), which throws an error as I see in my browser
can't find elements after appending
Can't seem to access elements after I've appended them, keep trying to get hyperlink id's but they seem to be undefined. Any idea how I can access these elements? My first function loads an xml doc, then appends it to a ul. Then, my second function is supposed to to get the id of the link the user clicked, then search the xml document for that node. Then only display that specific node. If I add a simple onclick function to the hyperlinks in function one to tell me it's id, it says it's undefined.
No action while animation plays
Hello fellas, Im making a web site, which i click on a link and i do some animation. What i want to do is when i click in other link while the animation of the first that i clicked is playing, the action of this new link (click) do not fire ... how can i do this ? Tyvm.
Uncheck a checkbox and trigger its callback function
Hi, I would like to uncheck a checkbox and trigger its callback function. I tried the following : $('#myCheckbox').attr('checked', false); $('#myCheckbox').click(); click() triggers the callback function but the checkbox will change to checked, unfortunately. If I don't call click(), the checkbox is successfully unchecked but the callback won't be triggered. Any clean solution for this ? Thank you ! The callback fucntion is : $('#myCheckbox').click(function() { ....
Making a function dynamic
Hi There! Fairly new to jquery but learning at a rate of knots.. I have a wordpress blog where each post on a page has a 'share' menu that uses fadeIn and fadeOut. The problem is when I load the page, my code isn't dynamic so every instance on the page has the same name, and every instance fades in and out at the same time.. $(document).ready(function() { $('#share-10 .shareme').click(function() { $('#share-10 .shareto').fadeIn('fast', function(){ setTimeout(function(){ $('#share-10 .shareto').fadeOut('fast');
Display random div
Hi there, Im just trying to display a random div on load. I have adapted someone elses code to try and make it work for divs (was originally for changing background) Can anyone see why it isnt working for me? the divs are both hidden on load $(document).ready(function(){ var randomNum = Math.ceil(Math.random()*2); var number = null; $.each([1,2], function(){ number = randomNum; if( number !== 1 ) { ('#randomdiv1').show(); } else { ('#randomdiv2').show(); } });
Special navigation
Hi everybody, I found this website and i would like to know if a jquery plugin is created for something similar or not too far. http://studio-output.com I like how you can navigate inside. Regards
multiselect help
I found a really great multiselect widget: Multiselect widget But there's just one downside. When i try to add two different multiselect elements its behaviour gets weird. When i drag one item from the right column to the left column then this also happends in the other multiselect element. So i'm really hoping anyone here knows what the fix could be...
iFrame css manipulation across target site
Hi Guys! I need this iframe for a facebook tab, since they changed the width to 520px. The original page in the iframe is 700px wide, and I've changed a few CSS properties using the frameReady plugin. It's works just fine, but trouble starts, when i'm navigating the target site, the CSS properties I've changed goes back to the original settings. This is my code: <script> $.frameReady( function() { $("#gmap-auto1map-gmap0").css("width", "520px"); $(".views-view-grid").css("width",
Associate AJAX results with initial data?
This is tough to explain which makes it impossible to search on. I'm guessing this is very basic. I have an array of objects with variables and ids. [ { id: "totalCountOfPeopleToSite", action: "add", metric: "ga:visitors" ... }, {} ] I loop through this array and create an AJAX request to Google Analytics who returns the data I requested (or an error). When the data comes back, I want to re-associate it with the object used to make it (as
Loading html and loop through json while changing html with json data?
Can't get my head around how to do this. Basically, what I mean is... I have a html file that I want to load, loop through the json data and for each json entry I want to add a new block of the html and insert the json data into the matching div/class of the html. json looks like this: {"Super" : [{"Name" : "John Doe", "Age" : "30"}, {"Name" : "Jane Doe", "Age" : "40"}]}; html looks like this: <div class="Name"></div><div class="Age"></div> So for each json entry of name/age, I want to insert
prepend not work in IE..
Hey Guys.. I'm use with prepend for create new elements and in FF its work really good (with styles, etc..) But in IE its not work.. its just add in text.. not html.. $("#chatMsgs").prepend("<div id=\"msgid_"+msg.msgid+"\""+bgColor+">bla bla..</div>"); What i need to change for use with this line? Thanks a lots for your support and the lib..
Selector not working
Hi, I have the following elements : <input type="radio" name="alert_email" value="1"> Activé <input type="radio" name="alert_email" value="0"> Désactivé I have both elements in the following variable : inputEl From that variable, I want to filter and get the element which has value "1", and trigger its click callback fct : console.log(inputEl.length); // prints 2 (contains the two elements above) inputEl.is('input[value=1]').trigger('click'); // error in Firebug "inputEl.is(" Thank you for any help
$.promt and $.post
The script does not work I should but I do not see the results properly invoked via $.post. Can you help me? <td><input name="varss" class="validate[custom[onlyNumber]" id="varss" type="text" onclick="$.prompt($.post('pages/numerotelefono.php',function(data){return onreadystatechange(data)}),{submit: scelta,buttons: { Send: true, Cancel: false }})" /></td>
getting index of active class how?
I have this using a number (oi) to save the old active index: var $oldactive = $('#menu-sup span').eq(oi); $oldactive.fadeTo (500,0.0); $('#menuq p').removeClass ('active'); But I want to get the index() of the active class something like: var oi = $('#menuq p.active').index(); So I use an active class to toggle the one active on/of and want to retrieve the index number of that active class. I set in below code <p> to active and I want to get the index number of the active <p> How? Thanks to prior
accordin / slide show problem
Hi all: I am creating a combination of accordin and slide show control. I created accordin control uisng jquery which works on mouse hover but it doesn't slide automatically. Please find attached html document to see what i have done so far. I want to create banner like the one at the top of www.andor.com Please help me on this. Regards, Asif Hameed
jQuery compatible with prototype.js?
CrossSlide, a jQuery plugin is working awesome for me. However, on on one of my pages, I use a jquery implementation of LightBox, which in turn uses prototype.js. When I reference this js, crossslide stops working. Here is the page I am working on: http://laudontech.com/temp/mansonville/projects/mansonville-projects.html Have you seen this before? Navigate to any other pages on the website to see crossSlide in action. Firebug does not appear to be reporting any errors. Thanks in advance, Mapper99
ajax updating sql then load to bring it back
Hi, I'm having trouble getting this to work... I setup a jquery ajax request to update my sql database... (add a product to shopping cart) then after it completes i want to use .load to re-load the shoppingcart (the cart is currently loaded with php include - so it is it's own seperate .php file) The problem is that when it reloads it doesn't have the "current version" If i refresh the page it's fine.. example - <script type="text/javascript"> $(function() { $("#addtocart").click(function()
ajax for loading my drop down menus?
I've used the ajax function to load in data like "click the submit button, ajax executes output.php and throws in back into a div tag in theform.php." But what if I have a multiple dropdown menus that submit the form and need to be reloaded depending on the previous dropdown menu's value? How would I set up the ajax so those are loaded without a refresh? Thanks
How do you debug a syntax error?
I keep getting a syntax error on line 3 and 4 of this very simple script. Normally firebug would give me enough info to fix this but jQuery escapes me. I can see no reason for the errors. Is it the library or something is missing ? <script type="text/javascript"> $(".shipping-switch[name=\'shipping_switch\']").click(function() { var selector = "div#sub-address"; if($(this).val() === "1") { $(selector).slideDown("fast"); }
jQuery Error: d is undefined
I am using the latest jquery version (jquery-1.4.2.min.js) Even though my web page is working correctly with the jquery functions, I am getting an error in both IE8 and Firefox; In Firefox, it says Error: d is undefined (line 49) In IE, it says; Message: 'handler' is null or not an object Line: 49 Char: 151 Code: 0 URI: jquery-1.4.2.min.js I am not sure what is wrong. Please help me. Thank you.
jQuery AJAX in Firefox
I am using jQuery AJAX to get some html/js from external file. It works fine in IE. In Firefox, the external div with <script> output gets pasted if I use an alert(), but if I remove the alert, it reverts back to blank i.e. the script output gets overwritten. This does not happen in IE. Please help.
Binding jQuery effects/events/functions to own JS-objects
Hi :) i am new in this forum and jQuery. I program a while in PHP, Java and a little bit in javascript. This time worked with raphael.js, a javascript library for drawing SVG conform elements with javascript. I need it for drawing graph structures like tree's. I tried to combine jquery and raphael. Is here anybody who do this before? I should like to attach jquery stuff (like effects or events) to SVG elements. For anybody who doesnt know what SVG are and what raphael do, please look at: http://raphaeljs.com/graffle.html
document.ready / element.load
When I want to wire up a bunch of events, I can use document.ready() to cause script to be executed once the DOM has been constructed. I'm not sure how to handle a situation I have right now, though. I have a DIV that will contain a form. When I need to I'm going to call .load() to load the appropriate work and then .dialog() to make it visible to the user. Within that form that is being loaded, there are 2 select elements that are dependent on each other....when the first changes, the second
How to execute something after an event (a reverse e.preventDefault()) ?
Hi, I know the title is not so good, it's hard to explain the simply thing I'd like to do. In fact, I'm looking for a reverse e.preventDefault() method, something like that : $(document).keydown(function (e){ if ( e.keyCode == 9) { e.reversePreventDefault(); //do something... } } I'd like to catch the focused link/input/whatever when I'm using tabulation. Thanks :)
Set focus() with Firefox doesn't work
Hi Folks, <script> $(function(){ $("#inp1").blur(function() { $(this).val("Test").focus().select();} ); }); </script> <div id="test"> Eingabe 1: <input id="inp1" name="inp1" size="5"></input> Eingabe 2: <input id="inp2" name="inp2" size="5"></input> </div> I 'd like to blur() "inp1" then change the val() of "inp1", set focus() to "inp1" and select "inp1". Change val() works but all other not. With IE all works right, not with Firefox (Linux) Why? Any hints? Timothy
disable context menu for future elements
$('a').bind("contextmenu",function(){ //do something return false; });This is the code to disable right click menu when we right click on "a" tag. But it doesn't work on elements created on the fly. Do you guys know how to tackle this? Please teach me.
setting and index in a css id - how?
In this code snip I want to be able to click an item i list-handbag and I then get the index li and with that index I want to animate the same index value in slideshow. How do I set that? Ex.: slideshow[index[list-handbag]].animate (..... what syntax can I use to do something on the slideshow img's? ------------ <div id="slideshow" style="width:100%;height:100%;"> <img src="/wp-content/themes/giovanni/images/handbag1.jpg" height="100%" alt="" /> <img src="/wp-content/themes/giovanni/images/handbags/viggiamo.jpg"
Eventhandler mouseover(
Hello jQuerians! I'm new to jQuery and got my first problem: I want a simple move of a <div> by a mouseover on a link. To start I've used this simple example: $("#bt_right").mouseover(function(){ $(".cslide").animate({"left": "+=10px"}, "fast"); }); $("#bt_left").mouseover(function(){ $(".cslide").animate({"left": "-=10px"}, "fast"); }); And the HTML-part: <div class="cslide" id="slide"> <div class="ccontent" id="content1"></div> <div class="ccontent" id="content2"></div> <div
JQuery Validate - Honeypot Validation to Control SPAM
Hello All. I am using jquery with my wordpress blog to post information to my online CRM system ( capsule CRM) Everything is working great, except that I am getting tons of SPAM. The folks at capsule suggested that I add a field,called comment, and then using CSS hide it from a human user. <input id="comment" type="text" name="COMMENT"/> CSS Entry #comment { display: none; } The idea would be that a SPAMMER would add information to this field. if the field has data, then it should not post. My
.hover effect on mulitple elements at once?
Hey Guys, Im trying to get 2 elements to execute some effect individually at the same time on a hover. Ive looked at .animate but if I understand it correctly I can do multiple effects but still limited to that single element. Heres a pseudo example of what Im trying to do: <code> jQuery("#main-nav-container ul li").hover(function(){ // MY 1ST EFFECT ON HOVER jQuery(this).find('ul.sublinks').css({visibility: "visible",display: "none"}).fadeIn(168); // MY 2ND EFFECT
Two scripts running but only one will work, Please Help!!!
- My Problem - If you go to my portfolio page, you'll see I have some thumbnails of photos which open up as a lightbox. But since I've added this to my page it stopped my top menu from animating. (If you go to another page you'll see how the menu is supposed to look). What am I doing wrong? - My Website - It's still under development. http://mswgraphicdesign.com/links/portfolio.php - What I've found out - The script below in the red is my lightbox script and in the green is my menu script. But
How to re-execute $(document).ready after first execution
I am brand new to JQUERY and have the task of fixing an attachment upload script for one of our site. I have a form that allows a user to upload certain file types as long as the file is 5MB or smaller. The page is using PHP, JQUERY, AJAX and JSON and is sending its information to our companies Salesforce.com (SFDC) CRM sysem to create a helpdesk CASE. The way the form works is that when the user fills in the attachement field and then clicks submit it creates a hidden iframe and a hidden form.
Finding syntax errors when using getScript
When loading scripts with getScript, I find it difficult to find syntax errors that cause the load to fail. Is there a way to get the usual syntax error messages in this case?
How to use variables as CSS arguments
I need to be able to pass a variable to a CSS argument after computing the size of the viewers window height. I am using an alert function to test it, but so far it won't populate. $(document).ready(function() { var winHeight = $(window).height(); var winWidth = $(window).width(); alert('The dimensions of the window are'+ winHeight + 'pixels high x ' + winWidth + ' pixels wide.'); }); Any ideas why it's not working?
Access CSS attribute
Hello, If I have a css class with that has an element #attr { color: #FFFFFF; } how do I access color without it being linked to a tag? ~
Next Page