[jQuery] Passing vars to function
HI, I have a simples question, hope to get some answer... Im having difficulty to pass vars to functions like: $("#artigos_listagem li").mouseover(function(e){ var orgBg = $(this).css('background'); $(this).css({ background: "#ffffaa" }); }); $("#artigos_listagem li").mouseout(function(e){ $(this).css({ background: orgBg }); }); Like you can see,
[jQuery] using jLint
Does anyone use jLint? I am leaning to use and debug jquery. Using firebug , Yslow lists jLint. I dont get any errors indicated in FF, but in jLint i keep getting this reference to the jquery library --------------- JSLint Report for: http://www.roxstyle.com/projects/blssi/cms/mapping-tool-v1/map-result-person.html 3 problems found. http://www.roxstyle.com/projects/blssi/cms/mapping-tool-v1/js/jquery-1.2.6.js Missing ';' line 18, char 26: ignore all var jQuery = window.jQuery = window.$ = function(
[jQuery] submit form
Hi, <form name="myForm" id="myForm" method="post" onsubmit="return false;"
[jQuery] Can't figure out how to traverse the DOM to these values...
Starting from the input with the class "update-button" in the next to the bottom line of the HTML/CFML below, I'm trying to traverse one line up to the input with two classes, the second being the important one, "update-input". I've tried using: $('.update-button).parent().next('.update-input').attr('value').val() to get the form field input placed into the field by the user. In other words, I'm trying to get the value the user puts into the field, which is the tour url. The next value I need to
Prevent bubbling
I have code that looks like this: $("table tbody tr").click(function(){ // Do some stuff }); $("table tbody tr a.remove").click(function(){ return confirm("Do you want to remove this row?"); }); The problem is that when I click on a link both events get triggered: the table row onclick and the link onclick. I only need the first one when I click outside a link. I've read the docs but I couldn't find a method to cancel bubbling from the second handler. What's the jQuery way to accomplish this?
[jQuery] hoverIntent like delays when using mouseenter, mouseleave
Is it possible to setup hoverIntent like delays when using mouseenter, mouseleave? I did some digging in to hoverIntent, but didn't see any support for the mouseenter/mouseleave triggers. Is there a way to do this in Jquery? I've got the following bit of code triggering a menu, but I'd like a small delay on triggering, since the div that is being load is a menu, and with the fade-in, I want to be sure the user intended to call the menu. jQuery.fn.fadeToggle = function(speed, easing, callback) { return
[jQuery] $('.classname') returns NULL in IE
I have a document which is almost valid HTML (with the HTML 4 transitional doctype), the only warnings I'm currently getting are about ampersands in query strings. When I try $('.classname') in every browser I get the object expected, in IE 6 & 7 I get null, I've also tried $('#someId') and get the same issue (and document.getElementById('someId') works fine in IE). Am I going crazy or is there something I'm missing?
[jQuery] How to make this work for multiple elements with same class
Here's the code that I'm trying to make function for multiple links on a page with the class of "update-link" How would I change this to make it work for the specific .update-link element that I click? $(document).ready(function() { $('.update-link').click(function() { $('this').prev('.options').hide(); $('this').next('.update-div').fadeIn(500); }); }); Thanks, Rick
[jQuery] Cycle Plugin - play/pause button?
Hi I am using the Cycle Plugin which is great. I know you can set pause:1 in the function options so that you get a pause on mouse hovering over the image. I was wondering if there is a way to set a play/pause function to some button in the page?
[jQuery] Selector Question
Why does this work? $($("button")[0]).bind("click", function(event){return AlertOnClick (this + " not " + $("button")[0]);}); And why does this DOESN'T? $("button")[0].bind("click", function(event){return AlertOnClick(this + " not " + $("button")[0]);});
[jQuery] using setTimeout to apply fade-in effect to multiple divs in sequence
Hi, I have 20 divs all with the class ".box" on my page. I want to apply the fadeIn() effect to all of them. I dont want them to all fade in at the same time. I want them to fade-in one by one, with a slight time offset. I dont want to use callback functions, because I dont want to wait until the fade is completely finished on one div before fading the next div. I want the fade effect on the next div to start a short time after the effect on the previous one has started. So I think I need to use
[jQuery] split email address into 2 fields; syntax error...
<code> $(document).ready(function(){ $("#email").change(function () { var email_addy = $('#email').val(); var name_bit = email_addy.(split("@")[0]); $('#username').val() = name_bit; }).change(); }); </code> I'm getting an XML error on the split function; can someone help me take this: dave.test@test.com and split that into 2 pieces: dave.test & test.com -- View this message in context: http://www.nabble.com/split-email-address-into-2-fields--syntax-error...-tp21444282s27240p21444282.html
[jQuery] Post values to an outside website
Hello all, I have 2 websites which i'm working on. One website has a simple email newsletter page (Site A) and another is a new website i just created with the newsletter sign up form (Site B). I was wondering if it would be possible to send the form from Site B and have it post the data Site A and then display the results in a modal box. Basically I'm wondering if this is allowed or if this is XSS and will be blocked. The other thing is would I use the $.post or the $.load functions to accomplish
[jQuery] [autocomplete] Anyway to highlight words accents-insensitive?
Autocomplete plugin: http://docs.jquery.com/Plugins/Autocomplete As in the subject, I want to be able to highlight the words accents- insensitivily. Example: if I type "Jose", "José" would be highlighted and vice-versa ("José" would highlight "Jose"). Is there anyway to do it? I'm willing to make changes in the source code, if it's necessary.
[jQuery] Removing an Image from slide show
I need to remove the first image from my slide show when i use $ ('#overlay').remove(); the image is removed, but an empty space appears in the slideshow. Is there a removeSlide method or something similar? Peter
[jQuery] What am I getting this error?
Hi, all... Why am I getting this error: missing ; before statement var tour-info-div = '$('this').prev('.tour-info-div')' ; \n from this code: ??? $(document).ready(function() { $('.update_button').click(function(){ var formval = { tour_url: $('this').prev('.update_input').val() , mls_number: $('this').prev('.tour-div-info').attr('id').val() } ; var tour-info-div = '$('this').prev('.tour-info-div')' ; var update-div = '$('this').prev('.update-div')' ;
[jQuery] how to get page number from tablesorterPager?
I'm using tablesorterPager plugin and got stuck. When the table is large, it breaks up the table and displays the page number at the bottom. For example, 3 of 7. This was done using html input tag. How do I extract the current page number and total number of pages? Instead of using html input tag, I need to extract these two numbers so I can do some further processing. Thanks. -- View this message in context: http://www.nabble.com/how-to-get-page-number-from-tablesorterPager--tp21442668s27240p21442668.html
[jQuery] how to get page number from tablesorterPager?
I'm using tablesorterPager plugin and got stuck. When the table is large, it breaks up the table and displays the page number at the bottom. For example, 3 of 7. This was done using html input tag. How do I extract the current page number and total number of pages? Instead of using html input tag, I need to extract these two numbers so I can do some further processing. Thanks. -- View this message in context: http://www.nabble.com/how-to-get-page-number-from-tablesorterPager--tp21442668s27240p21442668.html
[jQuery] html() function remove attribute double quote in IE
alert( $(content).html() ); --------------------------------------------------------- html code: <div id="content"> <a id="link" href="http://www.google.ca" target="_new">test link</a> <a id="link2" href="http://www.google.ca" target="_new">test link2</a> </div> --------------------------------------------------------- it will return in IE6 <A id=link href="http://www.google.ca" target=_new>test link</A> <A id=link2 href="http://www.google.ca" target=_new>test link2</A> ---------------------------------------------------------
[jQuery] Once validated..
I'm validating a form in php and am wondering how I can bind a jQuery function to a successful validation or how to check a var set in php with jQuery.
two-way binding of client-side json object with jqgrid
Hi, I am using jqgrid and use the client-side option for datatype, so i can bind the json string or object seperately on the client side. but i dont know how to get the data added by the user on the clientside back to the json object, is there any direct method or do we have to iterate through rows and create a json object. Thanks in advance
[jQuery] Masked Input Plugin
I need a customization in my mask. The mask does not have a fixed format. As the user types in the it can be changed. The year(after the bar) can be with 2 or 4 digits. Initial mask "99999.999999/99-99" If the user type another character mask must change to "99999.999999/9999-99" versions: Masked Input Plugin 1.2.1 Richfaces 3.2.1.GA Tks, Joel Lobo blogdojoellobo.blogspot.com Fortaleza - Brazil
[jQuery] getJSON problem - Urgent
Hi, I've got a deadline to get a project working and I'm stuck with a getJSON call problem. Here's what's happening. Visitors come to a landing page on domain A (domaina.com). All of the links and form submits on this page are coded with a javascript call to a function which calls getJSON on a completey different domain (domainb.com). The format of the onclick is like this: <a href="page.html" onclick="jsoncall(value);">Go somewhere on Domain A</a> The format of the getJSON call is like this: jQuery.getJSON("http://domainb.com/logclick.php?value="
[jQuery] Cycle Pluging "next up" text
Hello, I'm creating a slideshow with the awesome Cycle plugin and would like to append the alt text of the next slide into a "next up:" area. Is there a way to get the alt attribute of the next slide and append it to my next up div in the onAfter callback? Right now i'm using the before and after options to add "loading..." and current slide alt text, respectively: $("#fade").load("pictures.php", function() { $(this).cycle({ fx: 'fade', timeout: 0, prev: '#prev', next:
[jQuery] How to Validate Forms in both sides using PHP and jQuery
Hi there guys! I have finished a new tutorial for yensdesign.com We are going to learn how to validate your forms using PHP and jQuery in both sides: client side (using javascript with jQuery) and server side (using PHP). This is the link: http://yensdesign.com/2009/01/how-validate-forms-both-sides-using-php-jquery/ I hope you find it useful!
Creating a Visual SQL Query Constructor
Hi all, this is my first post here, I've read the rules and searched the forums, and did not find an answer yet. My idea was to build a Visual SQL Query Constructor. Some sort of JavaScript powered webpage. The idea is that a user should be able to build a SQL query by dragging nodes from a toolbox on some sort of workspace. He then would be able to connect these nodes to each other, to form a tree of some sort (having a root, nodes and leaves). If this is a well-formed tree, it even should be an
[jQuery] Javascript performance testing? In need of some help...
Hello: We have an ajax/js-heavy website that relies on Jquery. Some of the events throughout the site seem to get sluggish as the objects on the page grow. Is anyone interested in a consultative gig to look through our site and point to ways to improve our Jquery implementation, etc? You can decide if an hourly rate or project fee is most applicable once we discuss more - we'll happily pay a competitive rate. Please send over any sites you've worked on, or what your qualifications are. Thanks. Websiteguy
[jQuery] jQuery scripts not working with php ext.
Hello, On the site I am working on (http://www.pjhconstruction.net/) I have a couple scripts that I am using. Anyways at the moment I am using an shtml extension and using ssi's. I need to be able to convert the site to be using PHP and use php includes. My problem lies with all of my jQuery scripts not functioning anymore. If you go to http://www.pjhconstruction.net/index.shtml, you'll see the image rotator and the collapsed div navigation all working. But, if you go to http://www.pjhconstruction.net/index.php,
Want individual categories to slidedown instead of all of th
This is a bit of a tough one for me. I have tried using a for loop, but that didn't work, at least the way I tried it didn't work. The way my code is set up using JQuery, PHP and MySQL, when you click on a category the subcategories slide down to reveal themselves. Right now you can click on one category and all categories slide their subcategories down. I want only the one category to slide its subcategory down. Any thoughts? Separate JQuery file: var category = ".category_{$list['make']}"; $(function()
[jQuery] jQuery Form Plugin - after ajaxSubmit call, ajax submitting seems to be disabled
I have a situation where I have a form that remains on a page even after a successful submit - it is used to add items to a list of existing items. After submitting the form, successfully, the backend responds with a blank HTML form. This loads correctly after the call to ajaxSubmit. However when I submit the form a second time (to add an additional item) the submit is not sent through ajax, although my button handler which calls ajaxSubmit IS being fired (added an alert to the beginning to confirm
[jQuery] anyone knows vertical carousel ?
I am trying to find "vertical carousel" example. But I havent found yet. Do you know any jquery example about it?
[jQuery] Resizable() work incorrectly with Iframe in all browsers
Hi guys. I have a problem with the resizable() function. When its use with iframe, vertical resizing work incorrectly. Who knows how fix it? Here is the code: <html> <head> <title>title</title> <style type="text/css"> body { padding: 0; margin: 0; } #resizeDiv { background: #EEE; width: 100%; height: 170px; border-top: 1px solid #CCC; position:
ajax calls not happening wth jquery ans asp.net 2005
hi, am trying to call a server function like this $(document).ready(function (){ $('#Button1').click(function() { $.ajax({ type: "POST", url: "remotefunctions.aspx/Test", data: "{'str':'1'}", contentType: "application/json; charset=utf-8", dataType: "json", error: function (xhr) {alert(xhr.statusText);}, success: function(msg) { //alert(msg); var result = msg; alert(msg) alert("hI"); } }); }); }); c# function in remotefunctions.aspx.cs [WebMethod()] public string Test(string str) { return "-1"; }
[jQuery] jQuery Interface - Multiple Windows (Chrome/Safari problems...)
Hi all, I'm fairly new to jQuery (and CSS, come to think of it!), so this question might have a very simple fix, but I'm at my wits end with two browsers (Google Chrome & Safari [both on PC]). I'm using the Interface plugin (http://interface.eyecon.ro/). The site in question is here: http://www.deadredhour.com/temp/sandbox/skinning.html CSS here: http://www.deadredhour.com/temp/sandbox/wEXAMPLEindows.css In Firefox 3, IE 7 and Opera 9.5, everything's all okay. I've managed to get multiple windows
[jQuery] Smooth animation
Hi, group. Im trying to make animation using jquery, but its controlled server side using XMLSocket. When jQuery receive coordinates from server it moving my DIV across the browser but its too fast. I cant understand how to do smooth animation. My server script (perl) compute the same x,y coordinates like jquery (i saw how in jQuery core) but i dont know how jquery delay all these x and y coordinates properly to make animation smooth. Ill be happy if someone explain me how it works. Excuse me for
[jQuery] Help needed with Jquery Slideviewer: Making images change onclick
Hi I'm very new too website design and building, but have managed to hack together a website for my g/f as a Christmas present. Unfortunately being a woman she pointed out a whole lot of changes that she wanted made. One of those changes I just can't seem to get right. There are three galleries on the site that use Jquery Slideviewer 1.1. http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html I would like to have used JqGalScroll by Benjamin Sterling, but I struggled
[jQuery] Can I get the contents from respose by ajax
I like to use $.ajax function when I need ajax such as $.ajax( { url:'aa.php', cache:false, type:'get', data:{a:123}, beforeSend:function() { //do something }, success:function(res) { console.log(res); }, error:function() { //do something } }); res = responseText if server transfer html code back like: <div id='a'>123</div> <div class='b'>456</div> is there any way to get the value 123 straight from div?
[jQuery] load results in new page with .post on success instead of a div
Hi, I'm using jquery with CodeIgniter. I’m currently trying to use jquery’s ajax post to send a couple of variables to a controller and then load that controller according to the variables. This is because other than using the URI to ‘send’ variables, this is the only other way I know, and in this case, I don’t want the URI to have additional segments behind it for the resulting controller. The problem with my ajax post request is that while it is requesting for the controller, it is not displaying
[jQuery] Meta Data within elements
I am creating a product/category tree using jquery. I would like to be able to store additional data within each node. The nodes in my tree are basicaly list elements. How would I add data to these elements such as the count of products and categories beneath them ? I tried this method. jQuery.data(objNode, 'intProdCounter', intProdCounter); But I have had some problems.. are there any other ways of acheiving this ? thanks for any help in advance -- View this message in context: http://www.nabble.com/Meta-Data-within-elements-tp21416642s27240p21416642.html
[jQuery] Select all controls of the form
I am trying to validate all the controls that exist in the form. My form code looks like: <form id="form1"> <input type="text" id="txt1" name="txt1" /> <br/> <textarea name="txtArea" id="txtArea" cols="100" rows="4" /> <br/> <select id="sel1" name="sel1" style="width: 250px;" > <option value="">Select</option> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> </select> <br/> <input type="radio"
Next Page