[jQuery] A Syntax question/problem
I have the following syntax problem ... $("#search").bind("keypress", function(e) { if (e.keyCode == 13) return false; }); $('#search').change(function() { var vKeyword = document.getElementById('search').value $.ajax({ type: "GET", ... The first little bit of code traps for a user striking the enter key and cancels it (this prevents the page from submitting like a form). The second code snippet is the beginning of an AJAX script to get information based on a keyword value in a text field with an
[jQuery] Sort after insert append?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=us-ascii" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 8.00.6001.18828"></HEAD> <BODY> <DIV><FONT size=2 face="Trebuchet MS"><SPAN class=609255619-26102009>I have a list of Educations that are ordered by Date Completed. Same page I have an ajax form to add new education. How can I insert the new education where it should go chronologically?</SPAN></FONT></DIV> <DIV><FONT
[jQuery] clueTip display inconsistently
I've encountered some inconsistency in how the clue tip plugin displays. In most cases, it works perfectly using the JTip theme, yet when there are multiple links on a page, the links lowest on the page almost surely do not display a tip at all (except for the standard browser tooltip). And in some cases, the style changes entirely while using the same class. Here is a link to a sample document: http://d-college.cengage.com/art/0495799874_kleiner/student/bonus/ch04/04_08A.html In all cases, what
[jQuery] issue passing event to event handler in Firefox
Let's say I have a series of links on the page: <a id="link0" href="#">Link 0</a><a id="link1" href="#">Link 1</a><a id="link2" href="#">Link 2</a><a id="link3" href="#">Link 3</a><a id="link4" href="#">Link 4</a> and so forth. I want to attach event handlers to each of them using a for loop for simplicity sake. I can't just do: for (var i = 0; i < 5; i++) { $("#link" + i).click(function(event) { alert(i); event.preventDefault(); }); } because that will just alert 5 on each link since "i" is being
troubles with jQuery POST
I'm trying to make a post call to a REST service i have setup in C#. Here is the jQuery code I'm running: var myData = { "Active": "1", "Contactguids": _shapeContactGuidSet, "PageNumber": 1, "PageSize": 100 }; $.ajax({ type: "POST", data: myData, url: clientURLBase + "BizService/Contacts.svc/GetMultiContactDetails", dataType: "json", contentType: "application/json",
[jQuery] .toggle issues with TRs
I'm working with a table where any particular TR will have a link to load a nested Table. The jquery will 1) create the new TR + TD (with appropriate colspan) 2) add a container (DIV set to display: none) 3) load a new table via AJAX into said DIV 4) animate the DIV 'open' to show the newly loaded content This works great. Once loaded, though, I want subsequent clicks on the trigger to just show or hide this TR (as opposed to grabbing the data again via ajax). if I use .toggle() it works. The TR
[jQuery] return values
I'm having some problem with return value for a function. I have read some postings about this, but I'm just not understanding something. Hopefully somebody can help me with this.... I'm trying to access google blogger's API to display blog entries on my site. I'm doing this through JQuery and requesting a JSON response. Everything seems to work ok, but I want to access the link for the blog entry. This is a subset of the "entry" object. It's structured like this: entry: title, content, link: rel,
quick form tutorial question! :)
Hi guys, Im a complete newbie with jquery, I am following this tutorial in order to build a basically validated form with no page refresh on submit using jquery: http://net.tutsplus.com/tutorials/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/ So far, I have got to the basic showing the error messages if each field is blank, and changing what i receive as their message in an email by changing this part in the javascript: "var dataString = 'name='+ name + '&email=' + email + '&phone='
[jQuery] Superfish vertical - LEFT flyout??
Has anyone modified Superfish vertical menus so the flyout is to the LEFT? How? Ideas?
Designer turned Developer. (help)
hey everyone, small problem here, hopefully someone can help me. i am trying to get lightbox to work properly on my portfolio page and for some odd reason can only get it working on one image. if someone could please direct me on why this is happening, i would really appreciate it as i am just learning development. http://jaysaiseng.com/portfolio2.html Thanks, Jay
[jQuery] validate plugin + cluetip plugin issue. Are these 2 compatible?
Hello jQuery community, What i'm trying to do is very simple yet it is probably not easy. I've configured the validation plugin that it works the way i want it to work. Now i want a kinda 'callout' action on on particular error that i use the validation 'remote' option. In the message are i add cluetip into the config of the validation like this: $(element).cluetip({sticky: true, local: true, showTitle: false, attribute:"title"}); But it does not work in this manner. so maybe im doing something wrong
[jQuery] Scroll area alert
Hi all i want to do something so that when the page scrolls to the bottom of a div an alert pops up how would i go about this? thanks -- View this message in context: http://www.nabble.com/Scroll-area-alert-tp26061346s27240p26061346.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] jQuery.get does not return proper JSON
Hi, I am using jQuery.get to make an AJAX request to the server which should return a JSON object, but it is interpretated by jQuery as a string, not an object. Here is the javascript code I use: $.get(this.href, function(data) { console.log(data); console.log(data.votes_for); console.log(typeof data); }, "json"); And this is the PHP code on the server side. echo header('Content-type: application/x-json'); echo '{"votes_for":7,"votes_against":4}'; die(); I do not use getJSON because I want to make
Jquery tab - CSS not load for 2-3 seconds
hi friends i implement jquery tab in my new website but i have problem while page loading, when i first time open page it display random data without css for 2-3 second and then everything is ok, if anyone know the problem let me know http://www.newyorkwebdesigns.us/navbhar ... .php?pid=5 you can see screen shot of my problem http://www.newyorkwebdesigns.us/navbharat/problem.jpg
[jQuery] How can I call a function in jQuery plugin js file?
Hello, I am new guy for jQuery, and I got a problem where I am going to call a function in jQuery plugin js file. That's a json plugin file and named "json.js", it has a function named "$.json.encode(obj)", I am sure I set it referred in html file correctly, then I call it in $(document).ready(), in firebug console, it told me this function is undefined, then I call it in $.getScript ("json.js", function(){...}), it works well. Would you please to help how to call it without call $.getScript () ?
[jQuery] take 3 values at time for fade in fade out effect.
Hello I have following code which i am using for fade in fade out effect. with this code at time only one image is coming. I want at time it should show 3 images. like 1,2,3 then 4,5,6 Here is my code. var index_news = 0; // function initNews() { $('div#feed-ticker') .slideDown('slow', function() { $('div#feed-ticker li').eq( index_news ).fadeIn(); setTimeout( next_news, 5000 ); } ); } function next_news() { $('div#feed-ticker li') .eq( index_news ) .fadeOut(1000, function() { index_news++; if( index_news>
[jQuery] How can i set a number inside a h1 tag before the text starts?
Hi, i am using the table of contents function of rebecca murphey. The script works fine, but i need to extend itin two ways. 1. set a number for each toc element? 2. set exactly this number to he h1 inner html in fron of the text? So that the result is: 1. Head 1 2. Head 2 … … 1. Head 1 mycontent text djaskdjasödjaskdj aslökjd asd dkajsdjaslödkjasdkljasldkjasd 2. Head 2 mycontent text sldkasäfasdfkasdjflöasdf asdfasdkfjasdfnasdm,fn sdjaf asöd ... Thank you!
How can i extend this script with numbering?
Hi all, i am using the folowing jquery function to generate a table of contents from the h tags in my web page. I could make some changes but i am not able to extend the function, so that it puts numbers in front of my toc elements like 1. 2. 2.1 2.1.1 2.2. 2.2.1 2.2.4.5 etc.... Can someone help me to extend this function with this numbering? <script type="text/javascript"> (function($) { $.toc = function(tocList) { $(tocList).addClass('jquery-toc'); var tocListArray = tocList.split(',');
[jQuery] tablesorter reset?
I have a table that dynamically changes columns/headers and uses the tablesorter plugin. I'd like to reset my tablesorter, so that I can assign different sorting options for these new headers. I tried using unbind(), and then re-instantiating, but I get an error: cache.normalized[0] is undefined Any suggestions? Thanks
[jQuery] Autocomplete
Hi, I use jQuery's Autocomplete plugin on my website. What I need help with is sorting the list that appears. I want it to have the same sort that I have in the array where all the options are available. Best regards, Mikael
[jQuery] $.Event is not a function js/jquery/ui.core.js Line 345
Hi all, I'm having the following error when opening a dialog $.Event is not a function js/jquery/ui.core.js Line 345 I don't really understand what's happening since i'm using this code to load dialog in many places in my application an it's the first time that i'm having this problem... If any one has an idea, it's more than welcome :) Thank you in advance.
[jQuery] Tooltip Plugin: How to change Tooltip text later
I found a Problem with the jQuery.Tooltip Plugin. I want to change the tooltip text of an element LATER after calling .tooltip() Trying to set $(.element).attr('title', 'New Tooltip text'); creates a SECOND old style tooltip. Not what I want! Calling .tooltip() a second time an the element creates the tooltip correct but leads to really strange Scripting Runtime Errors! Calling $('.element').attr('tooltipText','New Tooltip text'); solves the problem for me. But: This is not documented in any way!
[jQuery] ClueTip focus/blur trouble
Hi Gang. I'm working with ClueTip and have run into some oddities. In particular, I want to show ClueTip when a textbox receives focus. The source shows me that I can use activation:'focus' for this and that will result in the cluetip showing on focus and disappearing on blur. Showing the cluetip is working fine, blurring is not. The code I have is this: $this.cluetip({ activation: 'focus', local: true, showTitle: false, sticky: true, mouseOutClose: true, arrows: true, closeText: "<strong>X</strong>",
[jQuery] Extending jQuery.fn and Wordpress issues
Hi! I'm building a jQuery (1.32) plugin for use with Wordpress (2.85). My problem is that when i'm extending the jQuery.fn object, the function is not added to jQuery.fn. Suppose that the plugin is a simple one like the following. jQuery.fn.zapp = function() { alert("zapp!"); } It is registered in jquery.zapp.js like this: (function($) { jQuery.fn.zapp = function() { alert("zapp!"); } })(jQuery); When trying to use the plugin in document.ready, the function is not recognized. If i take a look at
[jQuery] jQuery Ajax Request Encoding
Hi I am trying to send Hindi अनुयायी characters to my PHP Script. I set request header as ascii, I want that it should store अनुयायी in database. When I am using form and submit it normally, it stores value अनुयायी in database properly for given word. But when I use jquery $.ajax method to post the data it doesn't store it in above format. When I display encoding of the text from $_REQUEST variable it shows UTF-8 when
How to use JQuery functions in TAB Pages?
Hi, I'm having an .aspx page with 8 tabs, i used CSS tabs and on each tab click respective <div> layers are loaded. In each tab i'm using JQuery slide show so i need to load 8 different dynamic image slideshows from the database in my .aspx page. I did this for my first tab, everything has gone well, but when i'm trying to do the same for second tab, the second slide show is not working. can anyone please help meo ut? how can i use document.ready() function for 8 tabs? Here is my CSS and JQuery Code.
[jQuery] Jquery issue with IE 6 (works in chrome and firefox)
This works fine in chrome and firefox but does not in IE6. i am yet to try it out in IE 7. As you can see, i have an input field and when user enters a value and clicks on Save, Jquery $("span.saveLink").click (function() gets invoked which populates the SaveUserForm(pls note my input field is outside and its not enclosed in a form). The issue is, form gets submitted but except isNew set to 0 or 1, all other fields in Struts action show ""(empty string) when i do this in IE6 where as in Chrome and
[jQuery] How to tell if <option> is selected when it always defaults to first value?
There appears to be no difference between these two when the page loads. <select id="one"> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> </select> - or - <select id="one"> <option value="1" selected>one</option> <option value="2">two</option> <option value="3">three</option> </select> $('#id').val(); If there is no "selected" then it always defaults to first value. How can I tell if the page has loaded and no options have been selected?
Adding behaviour to dynamically-added element... GAH...
Hey y'all. I've got a series of pages which are based on a flowplayer tabs(div.panes > div) structure, whereby each tab is associated with a div which becomes visible onclick of the tab. The divs themselves are populated by a series of load() statements - because each div is driven by a PHP file that accepts a GET/POST variable as its input. At present everything is working perfectly, but I want to change something and can't figure out how to do so. One of the tabs (the Summary tab) contains a flash
[jQuery] Prevent key to change values
Hi every: I have this function: $("input[type='text']:order").keyup(function() { var v = $(this).val().replace(/\D/g,''); // removes non numbers $('#total_buyed').val( v * 2.75 ); }); The function is working correctly but when I press any key the same operation is calculated. How to avoid this? See online at http://jose-couto.com/pintpal4/order_pintpal2.html Cheers and thanks in advance -- ReynierPM
[jQuery] loading message shows up after page has loaded
Hello, I am using jQuery and BlockUI to display a "Loading..." message to the user while the page is loading. The problem is that the "Loading..." message seems to show up AFTER the page has loaded, not during load. Shouldn't the document.ready fire sooner than that? What am I doing wrong? <script> $(document).ready(function() { $.blockUI(); setTimeout($.unblockUI, 2000); }); </script>
[jQuery] Bringing arrows for Clue tip
Hi All, I am trying to bring arrows for the clue tip which i am using for my web site. Even though i have given "arrows: true" in my js, i am not getting the arrows. Please see below for the code i used and give me your suggestions. My js code : jQuery('a.clueTip').each(function(){ jQuery(this).cluetip({ width: 200, arrows: true, cluezIndex: 999, showTitle: false, cursor: 'pointer', activation: 'click', sticky:
[jQuery] Superfish ?
Im newbie... trying to implement Superfish vertical menu with Wordpress. Have working, kind of... shows the whole menu structure, just not indicator arrows. Paths all ok in css. May be related... What is "Hover Class?" Default is set to "sfHover." .. i assume i need to change something in WP but not sure what... THANKS for any help DRS
[jQuery] [JQuery Plugin Validate] How to know which button is clicked
Hello, I have a form with two buttons: "Delete" and "View". A checkbox is required for all actions. Validation happens when a button is clicked. If it's "View", it is just a normal operation. However, if it's "Delete", if the form is valid, it then needs to show a confirmation before form submission via custom handler (submitHandler). submitHandler: function(form) { if (confirmDelete()) { form.submit (); } } Problem: How do I know if the button is Edit or Delete inside submitHandler? The function
[jQuery] How to select some but not all elements
Hello, I'm building a nested menu where I want to add background colors only to top menu items. I can't change the generated code, so I have to live with the id's and classes as is. Relatively new to jQuery so still not used to filtering my selections carefully—is seems to grab everything. Anyway, I have tried: .is, .content, .filter, and some parent, child stuff, but can't seem to only apply the effect to the "top" class—it just selects everything. Thoughts? Fundamental concepts welcome. Thanks
[jQuery] Superfish - arrows & top menu width
Apologies if this is a css issue and I am barking up the wrong tree... It seems to me that the arrows which are added create an additional width on the menu elements. I would like to specify a fixed width for the top elements in my menu. It appears that the arrows are added automagically by the JS (neat!). I am guessing they are an additional width to anything specified in the skin css. Is there any way to use the arrows but to reserve space for the arrow width, so it doesn't change the top level
ajax call does not allow alphanumeric parameters in data
Hello all, JQuery seems to be giving an error when trying to pass an alphanumeric parameter like so: $.ajax({ type: "POST", url: "Default.aspx/AjaxTest", data: "{eventID:9a5}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { alert(msg.d); }, error: function(e) { alert("Event could
$('th', $table).each(function(column), confused parameter?
I was new to jquery area, and I learning Jquery through Learning jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques. that book has example. $('th', $table).each(function(column) {................} what's the $('th', $table) meaning about? it mean go through 'th', $table like ['th', $table] ?
[jQuery] show/hide problem
I am trying to have a image (link button) appear within a div on mousenter for the div, and disappear on mouseleave. I have this working in the following code as expected, but I only want it to apply to the specific div that is being entered/left. The way I have it right now it applies to the class, so every div with the class will trigger the function, which is not the desired effect : ( What I would like to have it do is have the image show/hide only within the specific div that is being entered/left.
[jQuery] Jeditable and other plugin question
Hi everyone. I'm a bit of a noob, so please excuse the question! I have a site I'm building that loads a lot of other html files into different divs, depending on buttons you press. Pretty basic stuff... Anyways, I can't seem to get Jeditable and a few other jquery functions to happen in any of these loaded divs. I'm sure this an easy fix for you all! in each file I'm loading, I include the correct jquery-1.3.2.min.js and other js files needed. Firebug shows them loaded correctly. But when I have
Next Page