[jQuery] toggle hide show function not working (code provided)
<script type="text/javascript"> $(document).ready(function(){ $('.bang').hide(); $("a.collapse").toggle(function() { $('.bang').show(); $('a.collapse').remove("(-)").append("(+)"); },function(){ $('.bang').hide(); $('a.collapse').remove("(+)").append("(-)"); }); }); </script> <head> <body> <a href="" class="collapse">(-)</a> <div class="bang"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean at magna nec erat tincidunt sollicitudin. Phasellus eu est.
[jQuery] JQuery and ASP.NET.
Hello, I want to use JQuery on my ASP.NET projects. Consider the first example on the following page: http://p.sohei.org/stuff/jquery/tablehover/demo/demo.html I am trying to create a control to easy integrate JQuery into ASP.NET pages ... ... and also register "commands" as seen in the page example I am posting. I would like to receive some advices on how to do this? I am looking for JQuery advices on the best way to do this ... Thanks, Miguel
[jQuery] Working with cluetip and validate
I just set a form using both plugins (jquery.validate.js and jquery.cluetip.js) Both use Title to set his content. So, a natural conflit is heppening. The cluetip title (before the pipe) its been the actualy content of validate red warning string. How can I circunvent that? If I can give a sugestion, both plugins could offer the possibility to set a custom attribute: <input cluetip='My Title|my detail' validate='please inform this field'> or, more simple to read: <input cluetip_title='My Title' cluetip_detail='my
[jQuery] Problem with jQuery's SVN Repository
Hi, I would like to download the jQuery's SVN Repository with TortoiseSVN, but when i try to download the project with "SVN Repository" and put 'http://jqueryjs.googlecode.com/svn/trunk/ jqueryjs-read-only" in URL label, this show: "PROPFIND request failed on svn/trunk.... 403 Forbbiden". Can someone help me to download the repository??
[jQuery] Problem 2 select boxes in same form
Newbie alert! I'm using jQuery to handle the show/hide of a div depending on option selected in a select box (based on code posted here previously): $(document).ready(function() { var $idOptionDivs = $("div[@id^='IDoption']").hide(); var $rnOptionDivs = $("div[@id^='reasonopt']").hide(); //display div's related to ID Option $('#doc_id').change(function() { var i = $('option', this).index( $(':selected')[0]); $idOptionDivs.hide().eq(i).show(); }); //display div's related to registration reason $('#reason').change(function()
[jQuery] AJAX Security
Well, this is not JQuery related, but I want to know the current best practices in AJAX developments... In an AJAX apps, such as user registration, we might have a API for user to check if their desired user name has been taken by another user. If we expose this API using AJAX, then it might become very easy for other people to automate a computerized bot to query our system. Are there any plattern(?) to provide some kind of security to the apps such that bot can be prevented? Thanks.
[jQuery] Fade and Center
Hello, I have 2 divs: <div id="parent"> <div id="child"> </div> </div> I need to create a function using JQuery that when called does the following: 1. Centers child inside parent 2. Fades in child How can I do this? Thanks, Miguel
[jQuery] Else If statements - why isn't this working?
This'll probably seem obvious to anyone with more jQuery knowledge than myself... I'm using the below code to show/hide specific divs according to which day it is. However, for some reason it isn't working. I've tried my best to find doumentation on how to write If/Else statements for jQuery but it's pretty thin on the ground... I've probably just missed something out. But, any ideas why none of the actions take place? $('body.schedule').ready( function(){ var today = new Date().getDay();
[jQuery] Question about comma separated selectors...
Greetings, I have a general inquiry for the core dev guys... I noticed today while running a selector that comma separated selectors build their results by order of the selector and not by order they appear within the originating DOM. What I mean is, if I am running a selector that has say two different classes and I want nodes for both (ie. div.classOne and div.classTwo) I might run $ (start).find('div.classOne, div.classTwo). My expectation when I did this was that returned nodes would come in
[jQuery] Superfish Image menus
Hello, I'm trying to build a Superfish where the menu items are images with two states. I managed to play with the background-image attribute of the ".nav li" and ".nav li:hover" elements but that applies to all the menu elements background. I need each element to have its own background. I tried giving them different IDs and testing the same approach with ".nav li #id" with no success, the selector doesn't work. Does anyone know if this is possible and, if it is, which approach is the most simple
[jQuery] Limits in Retrieving JSON with getJSON?
I am trying to get data from a database. I call an ASP page to retrieve a JSON recordset: $.getJSON('getRecordset.asp', { my request data } , function(data) {... It works but the JSON object I receive gets cut at a point (if I call the asp directly in the browser I see the whole recordset but via HttpRequest I can't) Example for n objects: -------------------------------------------------------------- [ {object1}, {object2}, ....{object (n-?)}, And no more. -------------------------------------------------------------
[jQuery] retrieving object-property when defining eventhandler
Hello, my question is more javascript-relating, but I'm developing my first jQuery-plugin and try to get to an object-property when I'm defining an eventhandler in another function. It looks like this: someProperty: "property", doSomething: function(){ //$(this) is a jQuery object //now I define an eventhandler to $(this)'s next element $(this).next().keydown(function(){ //now $(this) is the next-element-object //but how to acces .someProperty of the original object? }); } I'm a bit confused, maybe
[jQuery] superfish bug?
I think i found a little bug in the superfish menu, cause when i take the defaultmenu on the homepage of superfish http://users.tpg.com.au/j_birch/plugins/superfish/ Using the following steps i can reproduce the bug it only works in IE7: 1. extend 1st top menuitem 2. extend 2th level of one of the menuitems 3. from there go to the 3th menuitem, before the menu closes 4. then go back to the 1st item and you'll see that the 2th level is still extended and now its empty In IE6 and in FF everything is
[jQuery] Mixing two effects
Hello everybody, after hearing about JQuery i am now plungin in and i really like the possibilities of jquery. I'm trying to get the next result and i'm not sure if its possible. I want a div to go down with an image and go up after x seconds and go down with a new image. I tried animated.innerfade and getting a div go up and down with: <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready( function() { jQuery(".klikdiv").toggle(function(){ jQuery("#downdiv").slideDown("slow");
[jQuery] $.post get error in firefox
use like this: $.post('/testurl/', { param1: "value1" }, function(data) {alert(data)}); In firefox ,when I submit this ajax request,in the firebug it says,"Loading...",but no return. in IE it works fine. but if I change the "post" to "get" ,it works well,or change {param1:'value1'} to a empty {},it also works well, why? how can I post data in ajax use jquery.
[jQuery] Again on tablesorter and row hovering
Hi all I've changed a table to use tablesorter (+ its pager) instead of server side sorting+paging, so far so good. The last bit that is missing to make it fully functional is the classic "hovering highlights" effect. I've been reading here and there and I've found no precooked solution, nor I have been able to produce one... Basically I've been trying to assign an hover() event to the TDs of my table body, using something like this: $.tablesorter.addWidget({ id: "hover", format: function(table)
resizeable UI
ive been trying to get the resizable plugin working but cant seem to work it out. i have both the dimension and mouse plugins that are required. running the resizeable() function works as i see in the markup the divs added by the plugin but i dont see anything on the element to indicate the elemet is resizeable and also hovering over the element or clicking around to try to resize the element does nothing. do i need to have any css for it too work? it only says it needs the dimension and mouse plugins
[jQuery] jQ UI: sortable and draggable...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Arial">Hi, I'm struggling to mix the effects of sortable and draggable... I have two divs, each containing items that I want to be both draggable and sortable. Pseudo code: <div class="list" id="list1"> </font><font face="Arial"> <div class="item">foo</div> </font><font face="Arial"> <div class="item">bar</div> </font><font face="Arial"> <div class="item">moo</div>
[jQuery] TableSorter plug-in - custom sorting depending on direction?
Here is my page: http://www.doheth.co.uk/db/world/country If you sort some columns (eg GDP) you will notice the "blank" values appear at the top. However, I want them to appear at the bottom. Initially I created a parser which set the value to Number.MAX_VALUE if it was '-'. But this moves the blank entries to the top when sorting in descending order. Is it possible to always have these at the bottom? Is it possible to detect the sort order inside my parser?
Removing a class
I'm trying to remove a class from an element that holds an absolute positioned div. The problem is, it has to change it's class when the user clicks OUTSIDE the absolute-positioned div. So my code is something like this: <a href="#" class="parent"> <span class="absolute-positioned">Bla bla bla</span> </a> And my javascript is something like this: // Show box when clicking $('.parent').click(function(){ $('.parent').removeClass("show-box"); // removing classes for all other elements
[jQuery] show\hide back button
i have a simple hide the search button and replace it with a loading graphic script, however on firefox if i hit the back button the loading image is there not the search button. On IE the search button is back as expected $(document).ready(function(){ $("#search-form").submit( function() { $("#search-button").hide() $("#search-loading").show(); }); });
[jQuery] Storing last clicked to check against in future function calls.
Hello everyone, Just started working with jQuery in the past few weeks, fairly impressed thus far. :) I've got a questions which actually might touch base more on a general JS question but figured might as well ask it. What I'm trying to do: // What got clicked first? (capture) // What was clicked Second? (capture) // Was the second click the same as the first? // Hide child ul // else // Hide child ul + open new child from second parent I guess my key stumbling block is storing the last clicked
[jQuery] show\hide back button
i have a simple hide the search button and replace it with a loading graphic script, however on firefox if i hit the back button the loading image is there not the search button. On IE the search button is back as expected $(document).ready(function(){ $("#search-form").submit( function() { $("#search-button").hide() $("#search-loading").show(); }); }); -- View this message in context: http://www.nabble.com/show%5Chide-back-button-tf4858111s27240.html#a13902135 Sent from the jQuery General Discussion
[jQuery] does anyone have a latest document PDF
I searched with Google but all are outdated. I'm not running any java or coldfusion. Thanks.
[jQuery] Selectors tr and img
Hi, I'm using this code to add alternating table rows: $('.content_table tr:odd').addClass('odd'); $('.content_table tr:even').addClass('even'); Now I have some cells with images includes: <tr> <td> </td> </tr> Here I want to have another class added. Now I tried to get all the <tr> where an image is contained. Unfortunately I couldn't figure out how to select them. For instance: $('tr>td>img').addClass('odd'); Here the img got the class "odd" but I need the oposite way. <tr> should get it. Any ideas
[jQuery] Superfish Flash Content Over Menu (Only In Linux)
Hi, I can't make some flash content appear under the superfish menu although it does work well when under MS Windows using FF and IE6. I have configured all the known options to make this work ie: <param name="wmode" value="transparent"> I'm using Firefox 2.0 and Flash v9. Any suggestions will be appreciated. Thanks Manuel
[jQuery] disabling jQuery in older browsers
hi all, because of the code and stylesheets complexity, I have to disable javaScript entirely in IE 5.5< . I have a few js files with $(document).ready(function() in them. my current solution is to put the following lines right in the begining of the function: // IE 5.5 and lesser aren't supported if ($.browser.msie && $.browser.version < 6) { return false; } is there any possibility to do in a global way? something like jQuery.disable or jQuery.ignoreAll? what is the best practice
[jQuery] using thickbox with jquery live
Is this possible. i have a drop down called #sealprofile that puts an image into a div called #profilepreview i have this image set up with class="thickbox" i think i have to register a plugin or something with jquery live. how do i go about doing that?
[jQuery] .css() doesn't seem to work when I add the transitional DTD to my index page?
I'm having a weird problem. . . When I add: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> to the top of my index page, the css calls from the code snippet below stop working. // ************************************************************************* // propfuncs - // ************************************************************************* function update_property( id, property, value ) { if ( property == "posx" ) { $("#" + id).css(
[jQuery] remove tr
Hi, I have a cloned row(s) and a function to remove selected cloned row function remove_row(){ $('a.remove').click(function(){ $(this).parents("tr").remove(); }); } the problem is that i have to click twice on the link before anything happens (deletes row) and i don't know why...it works after that...so to delete first row i have to click twice on the link to remove the second row i can click only once...it doesn't matter which row i try to remove... the link is: <tr> <td>...</td>
[jQuery] .eq(variable) causing problem
Hi, I have the weirdest of bug. If I do: var item1 = 3; $("#"+menu+" .itemMenu li").eq(item1).addClass("highlight"); Then all the li elements get highlighted. If I do: $("#"+menu+" .itemMenu li").eq(3).addClass("highlight"); it works fine. How do I use a variable in a jquery query? Thanks in advance, P.
[jQuery] looking for a event calendar.
I´m looking a for a event calendar with jQuery technology. my actual solution is to configure a JSON array of events, and pass it to YUI.calendar. I´m using YUI calendar., and i´t works great, but wanna migrate all my jScript to jQuery. the idea is to have an inline calendar in wich i could 'mark' with code dates wich have events, change its innerHtml to have a little description of each of the event(s) for that date, and make a link to another page wich sows the complete event. is there some work
[jQuery] continus scroll - news ticker - div scroller
Hi all. i´m Miguelito ( newbe in jQuery from Spain) I have to do a continuos scroll function to a div with html structure like this: div-class listaScroll) ul li li li li /ul /div each li has html inside ( news to scroll) it works, but surelly you can hep me with some 'bugs' 1.- Rest-of-the-page-links does not work if i do not 'stop' the timer properly 2.- multiple divs in same page scrolling: scrolls at same time, stops in same time :( any ideas ? URL: my site:http://www.info-costablanca.com/index2.asp
[jQuery] Edit database rows
Hi I need to edit a number of rows from a Postgres database in one go. As I can see, http://jquery.com/plugins/project/jqGridView could be a good plugin to use. Is it? Any other options wit jQuery? -- Med venlig hilsen Kaare Rasmussen, Jasonic Jasonic Telefon: +45 3816 2582 Nordre Fasanvej 12 2000 Frederiksberg Email: kaare@jasonic.dk
[jQuery] jQuery in Ottawa
Are there any jQuery people in Ottawa, Montreal, Kingston or the surrounding area? Ontario that is.
[jQuery] A few jQuery Patterns
Hello Everyone, I just hopped on the jQuery bandwagon and I'm working on the following functionality so if there are any examples or tutorials that do anything like this I'd love to hear about them. I realize I will eventually figure all this out but if anyone knows of any working models, examples that are close to what I want or a list of what methods to study would be greatly appreciated because it would speed things up. (And that's what we're all here for right? �� ) Type 'n List: I would like
[jQuery] GreaseMonkey with native jQuery
Folks, I have created an enhanced greasemonkey extension based on the latest greasemonkey extension which loads the latest jquery into the runtime of all user scripts. User scripts need not do anything different, just start using jquery. You can find my enhancement here: http://monkey.coolspacer.com/ Note: It does not load jquery from http: links, and this approach is very easy to extend to any other runtime script you want. Infact I am thinking that its a nice idea to add a new directive to the
[jQuery] Again on tablesorter and row hovering
Hi all I've changed a table to use tablesorter (+ its pager) instead of server side sorting+paging, so far so good. The last bit that is missing to make it fully functional is the classic "hovering highlights" effect. I've been reading here and there and I've found no precooked solution, nor I have been able to produce one... Basically I've been trying to assign an hover() event to the TDs of my table body, using something like this: $.tablesorter.addWidget({ id: "hover", format: function(table)
[jQuery] Accordion Bug?
Hi all, I think I've found a bug with the accordion [1] component. $ ().activate(false) [2] doesn't seem to remove the "selectedClass" class from the header of the selected element, as I'd expect it to. I've made a simple test case over here... http://jason.m.cartwright.googlepages.com/accordionbug.html Could someone confirm this is a bug pls? Cheers, Jason [1] http://docs.jquery.com/UI/Accordion [2] http://docs.jquery.com/UI/Accordion/activate
[jQuery] How to concatenate all the OPTIONs of a SELECT to a text field ?
Hello, I guess the title says it all :) I have a SELECT which I manipulate thanks to this plugin (http:// www.texotela.co.uk/code/jquery/select/) and I would like to concatenate its OPTIONs into a text field when I click on a button. How can I do that ? Thanks a lot for your help ! G.
Next Page