[jQuery] Using variables in attribute selectors
I've done a lot of search on this subject but haven't been able to find any examples of using variables in [attribute=xx] selectors, only literals. As far as I can see it doesn't work and I was wondering if there is any way to make it work -- for example with special syntax used in this position. Here is an example of what I am trying to do: var doPagenav = function() { $('a.pagenav').click(function() { var dummy = $(this).attr('custom'); $('#contentpane').load(dummy); $("#tree
[jQuery] Open in new Window based on C# case statement?
Hi All, I've recently taken over a project after one member of staff left and he's done his navigation in a bit of a strange way that's causing a bit of an issue. The navigation is populated from a database that has a 'Shortcut Type' attributed to it. What I want to achieve is if the shortcut type in 'External URL', open in a new window. Here's what I have so far (Current Path is what's passed into the case statement): case "External URL": //Only works if user presses control to dodge google pop
[jQuery] Solution To Many Of Your CSS Nightmares!
trying to integrate a 3rd party css candy into your site may result in conflicts between the candy's css and your site's css, resulting in a rendering mess. stuff that works beautifully by itself blows up when you put it into your website. this trick may not find you a new girlfriend, or butter your bread on both sides, !BUT¡ it may instantly eliminate your css conflicts. it instantly eliminated ALL of the rendering conflicts i was having with superfish (and other css menus), when trying to integrate
Beginner: Selecting using "next()"
This coincides a little with the post I made earlier, but I sort of figured that one out, so here it is: I'm using $(this).next().toggle(400); to make the div following the clickable link toggle. However, I'm now needing to insert an element between the clickable link, and the div that is being toggled... so essentially I need the 'next()' to skip an element... as if to say "ok skip an element then select that next one, not the element immediately following this one"... or $(this).next().next() to
[jQuery] How show childern in sequence
Hi all, I need a litlle help with this problem. I have 3 DIVs inside Parent DIV and I need show this childern's DIVs in sequence. Firstly first, than next etc. Is there anz function, because code below shows all DIVs parallery. Thx for input.
[jQuery] AjaxCFC success return value
I am trying to create a function that returns the value produced from an Ajaxcfc call. function getRootCatID(strSupplierCode){ var objParams = {}; objParams.strSupplierCode = strSupplierCode; $.AjaxCFC({ url: "model/category/CategoryAjaxFacade.cfc", method: "getRootNode", data: objParams, unnamedargs: false, serialization: "json", success: function(intCatID) { alert(intCatID);
[jQuery] jQuery and dynamic node generation - HELP!
Hi, after fiddeling around to find a solutions for some hours now, maybe you can give me a hint: I have a navigation like this: <div id="sub-navigation"> <ul> <li><a name="0" href="page.html">page name</a></li> ... insert nodes with jQuery here ... </ul> </div> I want to insert nodes dynamically with jQuery and the final structure should look like this: <div id="sub-navigation"> <ul> <li><a name="0" href="page.html">page name</a></li> ... <li> <a ...>...</a> <ul>
[jQuery] Put event click on a Radio group
Hi! I have to put a click event on some radio with the same name... <input type="radio" name="idtypecontent" value="1" /> 1 <input type="radio" name="idtypecontent" value="2" /> 2 <input type="radio" name="idtypecontent" value="3" /> 3 And here my javascript: $("input[name=idtypecontent]").click(function(){ //test alert($("input[name=idtypecontent]:checked").val()); }); But i got only a working event on the first radio button. Is my javascript wrong for what I want? Thanks!
[jQuery] json and dates
I just started working with jquery yesterday in conjunctions with Castle Monorail. I'm spiking a very simple ajax call. here is my html <script type="text/javascript"> $(document).ready(function() { $("#ajax-link").click(function() { $.getJSON("CurrentTime.mvc", function (time_from_the_server, the_status) { $("#server-time").html(the_status + ' - ' + time_from_the_server); }); }); }); </script> <a id="ajax-link" href="#">Get</a> the current time from the server. <div id="server-time">[should be displayed
[jQuery] Simulate BackSpace key
I read that I can simulate keypress with code: $('#editor').trigger("keypress", [],null,{which: 8,pageX:e.pageX,pageY:e.pageY}); This code dont work. Please help me solve this.
[jQuery] simulating blocking $.get
hi i got a function, which calls ajax way. problem is that the function should only return after the ajax call is completed. otherwise i could end up with unitialized data. how can i simulate such a thing with jquery? or is the usual way to pass another callback function to the call() method and place it inside the passed .$get function (something like callback chaining)? i guess a drawback from blocking would be that the javascript process would halt for the ajax-call (javascript only has one execution
[jQuery] To check if an element value is of a particular class type
Hello All This is what I am trying to do. I have defined an "email suffix" class for a particular textbox element so that it accepts values for that particular class. Whenever there is a different value inserted, it displays a jquery error. Now, there also is an Add button which should add the value and display it in a widget list if it is a "valid value". So, I need to check and insert an if else block on the click event of the add button to check if the value inserted in the textbox is a valid
[jQuery] Difference between using a <div> instead of <iframe> in load
what's the difference between using a <div> instead of <iframe> to load an externat page?, i've been using this it seems working good but what are the disadvantage in using <div> instead of <iframe> tnxs.. Jan
[jQuery] the new whitehouse.gov - jQuery powered
I just noticed that team Obama pushed a new website live today - powered with jQuery! http://www.whitehouse.gov
[jQuery] jQuery ui Tabs and GreyBox
Hi, I'm having some dificulty doing the following with Jquery tabs and GreyBox: I have a page with 2 tabs using Jquery and on the second tab I have a link than opens a Greybox centered window onClick="return GB_showCenter('','','') that is a update form that closes automatically when the form is submited and reloads the parent window that has the tabs, but when it reloads the page the tab selected is always the first, not the second were I have the link and were it shows the updated information.
[jQuery] Using jquery to set div and get this div text in asp.net
Hi, I have been working on a small project where I have run into a hurdle! I used jQuery to set the text of a div The code for this is given below: var comments = $('textarea#modalTextArea').val(); $('#divComments').html(comments); However, I need to access this value in the asp.net codebehind - this is not taking place when I try this code - dim s as string = divComments.InnerText Any ideas on how this can be accomplished?
[jQuery] OOP jQuery context menu
Hello, I've working on a back-end for a company which is supposed to work with their platform. The problem that I've encountered now is that I've been using a plugin to enable rightClicking and also my script for a simple context menu which can basically show a div. BUT I need it to be OOP and show a unique context menu depending on child elements without having to create more than one function since he later makes it a C Class. Here is an example of my script: $(function() { $('.ctxMenu > ul').hide();
draggable/droppable
hey everyone im having some trouble with the drag & drop. i have drag working perfect until i add droppable. [code] <script type="text/javascript"> $j(function(){ $j(".drag").draggable({helper: 'clone'}); $j(".drop").droppable({ accept: ".drag", activeClass: 'droppable-active', hoverClass: 'droppable-hover', drop: function(ev, ui) { $j(this).append("<br>Dropped!"); } }); }); </script> [/code] the error that I am receiving is Error: m is undefined in ui.droppable.js which is this line: droppablesLoop:
[jQuery] Validate: Meta class and markup validation
We've been making ever more use of the excellent jquery.validate plugin on our various sites. In order that we don't have to write a validation script for every page with a form we have been using the embedded class style of rule definition, and as the rules we need for validation have grown more complex we have switched from simple classes to using the metadata plugin and the {validate:{rule:value}} syntax. This works well, except it leads to problems when trying to validate pages with the w3c validator
[jQuery] jquery parse xml can't run ie7?
<html> <title>hello</title> <head> <script src="../media/js/jquery-1.3.min.js" type="text/javascript"></ script> <script> function ParseXml(xml){ var xml='<?xml version="1.0" encoding="UTF-8" ?>'; xml+='<root>'; xml+='<result><company>33</company></result>'; xml+='<result><company>222</company></result>'; xml+='</root>'; alert(xml); $(xml).find("result").each(function() { var id=$(this).children("company"); alert(id.text()); }); } </script> </head> <body> <input name="Show" type="button" value="ParseXml()"
jQuery doesn't like being put inside a parent div in IE
Hello all, I have a weird problem. I put a container div around the html for a kwicks style navigation bar and a Cycle Plugin slideshow which are both being powered by jquery scripts. It works fine when I look at it in Firefox, but when I look at it Internet Explorer, the navigation bar isn't where it is supposed to be and the slideshow isn't even showing up. 1. This is the page with the container div around the rest of my html code that doesn't look the same in Internet Explorer - http://www.idea-palette.com/testfolder/pagetest2.html
[jQuery] Identify last keeypess
Hi, I've been searching the web for an answer to this but haven't been able to find one. I have a form which is using an image as it's submit button and I want users to be able to submit the form by pressing enter. Simple enough: // submit the login form if the user hits enter $('.login_input').keypress(function(event) { if(event.keyCode == 13) { $('#login').submit(); } }); That works fine. However, if the user is presented with a list of options for the text input by their browser and they use the
[jQuery] slideToggle in jQuery 1.3
I noticed as of version 1.3 slideToggle animation effect had been modified "the vertical padding and vertical margin are also animated, creating a smoother effect" so I decided to test this out. It works great in Firefox but in IE 7 its even less smooth than the previous version. The vertical padding and margin actually jumps rather than slides creating a noticable jumping effect (you can see this on the jquery docs example page - http://docs.jquery.com/Effects/slideToggle).
[jQuery] Flexigrid with treeview
Hi, I need to imliment a flexigrid inside a flexigrid but first grid is as tree. e.g. records of first flexigrid will be collapsable and on expanding it should show one more flexigrid with some data. Please reply me ASAP. Right now we r using the below code vmf.grid.build("contractTable",{ ds: '<%=request.getContextPath()%>/com/vmware/s3portal/framework/ pageflow/controller/contract/getUserContractList.do dm: [ {display: '<fmt:message key="CONTRACT_CONTRACT_ID"/>', name : 'CONTRACT_NUMBER',
[jQuery] treeview with ajax
Hi I am using treeview with AJAX. But my problem is that when I combine treeview with AJAX, the treeview is always in not collapsed (it is in expanded tree) Can anyone tell how to make the tree collapsed. Thanks in advance. <script type="text/javascript"> $(document).ready(function(){ $("#tree").treeview({ animated: "fast", collapsed: true, unique: true, control: "#sidetreecontrol" }); })
[jQuery] treeview with ajax
Hi I am using treeview with AJAX. But my problem is that when I combine treeview with AJAX, the treeview is always in not collapsed (it is in expanded tree) Can anyone tell how to make the tree collapsed. Thanks in advance. <script type="text/javascript"> $(document).ready(function(){ $("#tree").treeview({ animated: "fast", collapsed: true, unique: true, control: "#sidetreecontrol" }); })
[jQuery] Refreshing Menu after Adding New Structure
Hi, I am wondering if there is a method to refresh or recall the JQuery function that will process the unordered list and its list items in my menu in order to add the JQuery specific information back in after some new elements have been dynamically added to the menu structure. As currently I have redrawn my unordered list HTML but it does not contain the jQuery specific information and therefore I can no longer hover over the links and see the sub menus. Thanks in advance Chris
Toggle executes twice
Hi all, Brand new to JQuery and having a hard time with it. I inherited a project that involves a submission form. The form has categories for users to select from, many of which have sub-categories that are hidden on page load. The form is designed so that when a checkbox is clicked, the corresponding subcategories appear. It has worked fine, to date. Here is the code from our .js file that I think makes this happen: $('#category-list input').click( function(event) { if ( ! $(this).attr('checked')
[jQuery] cluetip class problems SOLVED!!
Thanxs Carl! Works great now! Start experimenting right now! thanxs!
postback issue with jQuery in ASP.Net
Hi, Folks -- I added some jQuery to my ASP.Net page to try to enhance user friendliness. Specifically, the page has three radio buttons for three different payment options, and there are also fields associated with each of the payment button radion options (for instance, a Purchase Order field associated with the Invoice radio button option). My goals were to: 1) Automatically select the corresponding radio button when mouse is clicked in corresponding field. (For example, select the Invoice radio
[jQuery] Unexpected DOM layout changes in IE6+
Just finished some lengthy debugging of a layout that was breaking in all versions of IE I have access to (6, 7 and 8b2). OS is Windows Vista Business, if that matters. I figured out how to bypass the issue but not quite sure what to make of the cause of the error. The layout is a pretty standard fixed-width with a header, a content section split into 3 columns, and a footer. Following the 3 columns in the content section is an IMG. The layout works fine in all browsers I've tested. However, if I
[jQuery] each async?
Catching up on my Ajaxian RSS feed I came across an article that linked to: http://www.nczonline.net/blog/2009/01/13/speed-up-your-javascript-part-1/ It made me think, could jQuery benefit from a $.eachAsync method? I think there are some cases where this could be beneficial. p.s. The comments on the Ajaxian article are informative http://ajaxian.com/archives/looping-through-your-items-without-waiting-around
[jQuery] Documentation on comparative operators?
Hi My first message on this board after some weeks learning, and fighting with, jQuery. My main question is: is there any documentation on simple comparative operators in jQuery? I'm thinking of =, <, >, <>, that sort of thing. I'm aware that these symbols aren't used in jquery, so that to test equality, say, you have to use is(), but I can't find any documentation on is() or similar. This has come to mind because of the following simple code: // Choosing 'Other' from the organisation type combo
[jQuery] cluetip class problems
See: <a href="http://www.moof.be/nieuw/intro2.html">www.moof.be/nieuw/intro2.html</a> I try to use cluetip with a class description on 3 links. But I seem to have done something wrong.... Changed it to a class but nop not working. Only "22222222" with a "id=sticky" seems to work. I still messed up something ... This is the code with a=class<div class="Ih2E3d"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8">
[jQuery] Django flash my page automatically after a form submitting in jquery
Hi, After struggling in google for days on this problem , I hope any of you could help me solve it. My problem is that after I submit a form in jquery with $.post to the server, which is powered by Django. The post data has been sent to the server, and saved in the database, but the function of the the ajax success has not been executed because the page has been flashed. At the same time, I found a log error in the server: <blockquote> File "/usr/local/lib/python2.6/site-packages/django/core/servers/basehttp.py",
[jQuery] N00b question: Need help referencing input.value in my code
I'm trying to write a couple functions that will clear a form field on focus. I also want to the change the class if the value has changed. I'm new to jQuery and a novice Javascript developer, so hopefully my issue is apparent. There appears to be an issue in how I am referencing $this. I wanted these functions to be dynamic, as in they will automatically affect all inputs on my form. The functions appear to be attaching properly - onFoucs confirmed - but if I console.log out $this.value it is undefined.
[jQuery] jQuery noConflict() help
Trying to use jQuery & some plugins alongside Prototype/Scriptalicious in Tapestry I added noConflict to my scripts using this method: jQuery.noConflict(); (function($) { $(function() { //my stuff here }); })(jQuery); But I'm not clear as to whether or not I need to go through each plugin script adding noConflict() as well. Or if I've just chosen the wrong technique... Can anyone clarify? Thanks
[jQuery] [jquery]$date1 = $('<div />')What does it mean ?
$date1 = $('<div />') http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiMonth.html $date1 = $('<div />') .datePicker({inline:true}) .bind( 'dpMonthChanged', function(event, displayedMonth, displayedYear) { $date2.dpSetDisplayedMonth(displayedMonth+1, displayedYear); } ) .bind( 'dateSelected', function(event, date, $td, status) { $date2.dpSetSelected(date.asString(),
[jQuery] Content loading with AJAX is lost in IE after click
Hi all, can you check pls, what I am doing wrong in these scripts. Check pls menu "Rules" and its submenu functions. In FF3 and GCh its works fine, but in IE it lost part of ajax content. address: http://83.240.47.84/skyrace2/ Thank you for your help in advance.
Remove .click() binding
Hi all! I'm having some trouble removing the "click" binding from elements... I have a function that looks like this: function items_click(cmd) { if(cmd=="edit") { $(".item").click(function() { alert($(this).attr("id")); }); } else { $(".item").click(function() { return false; }); } } But I can't seem to unbind the click again, it just keeps alerting the ID of the clicked element.. Did I miss something in the documentation or am I just not using
Next Page