[jQuery] javascript syntax question
i was looking for an explanation for some of the syntax that jquery uses but i couldn't find it anywhere (or it seems to be). Anyways the syntax that i was looking for is as follows: (function(){.....})(); I am assuming that it is a javascript syntax but i don't know what it is called. Also If someone could explain to me what the syntax is actually doing it will be helpful. Thanks
[jQuery] jQuery Camp 2008 to be held at The Ajax Experience on Sept. 28th.
I will be announcing this once a week until jQuery camp arrives. The jQuery Team is pleased to announce the second annual jQuery Camp! jQuery Camp 2008 will be held on Sunday, Sept. 28, the day before The Ajax Experience, in Boston, MA (location TBA). Last year, over 100 jQuery developers gathered for a full day of jQuery sessions, which included talks from such big names as jQuery creator John Resig and other core team members, as well as talks from expert users exploring new and exciting jQuery
[jQuery] Detecting the selected option
I have a button (#showgraph) that submits a form, but when this happens, I want a certain div (#overlaybutt) to appear only if a certain value ('no') is present in one of the select options (#initCond). Here's what I have so far, which isn't working: $("#showgraph").click(function(){ // Only unhide the Overlay controls if Initial Conditions are set to No. $("#initCond").change(function() { if (this.value == 'no') { $("#overlaybutt").show("slow");
[jQuery] [serialScroll] how to eliminate easing on animation?
Hi, how can I eliminate that sort of easing in the animations of the SerialScroll plugin? when an action starts, for example on an <ul> with images in its <li>'s, the images start moving slow, then they reach full speed, and finally they stop by slowing down again. then the next animation is fired. I got say 16 pics, and I'd like to achieve a smooth animation for all of them, as if they were actually cycling, not sliding one by one. I tried step: 16 with a duration of 100000 in the settings, but
[jQuery] getJSON used multiple times
I am trying to implement a related selects. When the user chooses a client 2 other boxes get populated. When the document is ready I add a change event to the company select box. When the company is selected it fires off 2 methods each of which populate the other select boxes. A look into firebug shows that both queries are running and the json is being returned. The 1st drop down gets populated but the 2 one is acting very odd. Even if I were to rip the code out of the 2nd function and just stick
[jQuery] slideToggle() giving a noticeable "skip" or "bump" when revealing/hiding div
I have a test page showing my issue here: http://www.professionalphotographertheme.com/demo2/ Click on the "5 Comments" tab, and you can see it. It's even more obvious if you click it again to toggle it closed again. I slowed down the effect significantly to make it easier to see. I'm certain this must be a stupid noob question, but I've searched and searched and can't find the answer. Any assistance would be greatly appreciated. thanks! -- View this message in context: http://www.nabble.com/slideToggle%28%29-giving-a-noticeable-%22skip%22-or-%22bump%22-when-revealing-hiding-div-tp18121327s27240p18121327.html
[jQuery] Tabs UI - Mousing over a tab to display content of all panels
I have implemented Tabs in such a way that mouseover works to display the various content panels. What I need is the ability for mousing over the last tab to display all of the content panels. The number of tabs is known and doesn't change. Does anyone have code that does this? Thanks
[jQuery] Fix for problem: Firefox 3, FOUC and incorrect width() on "ready"
This is a heads up for anyone having problems with Firefox 3. I had a problem with finding the width()/outerWidth() of elements during a "ready" function, it would always be the size of the window. While debugging I also noticed a short "FUOC" (Flash Of Unstyled Content), which tipped me off to the possible cause. The solution was to move my CSS stylesheet _above_/_before_ my JavaScript scripts. To make it clearer, I had this: <script src="../scripts/jquery.js"></script> <script src="../scripts/common.js"></script>
[jQuery] [validate] Multi-step form, how to validate only the current step?
I am trying to get a form with similar functionality to the demo shown on http://www.mredesign.com/demos/jQuery-accordion-w-validation/#thedemo but I'm having a problem that I cannot figure out. When attempting to navigate from the first step to the second via the "Next" button the validator.form() method validates the entire form rather than the current step. What I don't understand is that the exact same code works on the MreDesign.com demo. Here's what I'm doing: //javascript $(document).ready(function(){
[jQuery] Write binary data (from server) is possible with Ajax?
Hi, Sometimes, via AJAX, I'm getting binary content from a server (application/octet-stream), other times html-text. When server response with binary content (PDF, EXCEL, etc) I'like to send to user. It's possible???? This is my code: function CNMSubmitAjax(arguments,id_capa, extra_props) { var ret; var _msg=""; $.ajax ( { type: "POST", url: CNMCONTROLLER, cache: false, async: ASYNC, data: arguments, beforeSend: CNMWaitWindowStart(), error: function (o,msg,eoerror) { CNMShowAjaxError(o,msg,eoerror);
[jQuery] Noob Question: Using Selectors after ajax load
I am sure this has been answered before, but I could not find it. I click on a link which loads a second page into a div using the load function $(document).ready( function() { $(".actions a").bind ("click", function () { $("#ajax_div").load($(this).attr("href")); return false; } ) $('#SampleCustDue,
Other function
Still trying to understand how to make tables expandable like a jtree. I found a good example on http://www.javascripttoolbox.com/jquery/#expandablerows <script src="scripts/jquery-1.2.6.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function() { $('tr.parent') .css("cursor","pointer") .attr("title","Click to expand/collapse") .click(function(){ $(this).siblings('.child-'+this.id).toggle(); }); $('tr[@class^=child-]').hide().children('td');
[jQuery] [validate] Validate based on other fields but not being required
Hi all, I'm just getting to grips with this Validation plug-in but would like to check whether something is possible. I would like to run validation on a field based on values from other parts of the form. I realise that this is possible with the required field, i.e. required: function(element) { return jQuery("#textarea1").val == 'buga' && jQuery("#textarea2").val != 'booga' } But this is also possible for the other functions? i.e. the same as above but for maxLength? maxLength: function(element)
Very simple form validation
Hi, I'm looking to validate first name and email fields using jquery. First name field should display an icon or msg if less than 3 charachters are entered. Email field should show an error/icon if the input is anything else than a valid email. Don'y want to use bulky form validator plugins for unless necessary. I would appreciate some help on this. Many thanks
[jQuery] FF3 not showing Thickbox content until refresh
hello! Since Firefox3, the thickbox (iframe mode) i use only show content if i refresh the iframe inside the thickbox _ rather annoying... Has anyone been facing this and know a fix? Thanks ! Alexandre<br clear="all"> -- Alexandre Plennevaux LAb[au]
[jQuery] Refactoring help
Hey guys! I've spent a bit of time writing some JS to pull some JSON into three dropdowns, and the resulting code is a bit messy (70 lines, of which, 40 is just repetition). I'm a bit useless with refactoring, and I would really appreciate some pointers in trying to tidy this code up. I'm not normally asking for help, but JS refactoring is definitely my Achilles heel! Moving some of this into functions is probably my best bet, but I'm not sure where to do that. Thanks in advance! [code] var jsonReq;
[jQuery] php with javascript...jquery...
Hi I have a question. Is it possible to use php with javascript and even jquery? I want to make an if and then statment in php where it checks the database if their is a photo/image present or not, if not then a table that supposed to show the image would not be visiable if their is a image then the table becomes visiable and will show the image. Is this possible?? is they any examples that shows javascript working with php??
[jQuery] How to get the selected word ?
Hi, I'm trying to reproduce the altclickanswers on nytimes website, but with jQuery. Basically, when you dblclick on a word, it fires a popup with the selected word for query. My problem is "How to get the selected word" ? Which selector can i use ? var the_selected_word = ???; $(the_selected_word).dblclick(function () { var the_url = "http://www.google.com/search?q= + the_selected_word +"; window.open(the_url,'name of the popup','height=450,width=800,location,menubar,toolbar,status,resizable,scrollbars');
[jQuery] Select option name attribute
How do I retrieve the name attribute of a selected option using jquery. IE: <select name="textselector"> <option name="11">Text</option> <option name="12">Text 2</option> </select> In this example, I would be trying to get 12 when the "Text" option is selected.
Need Help with Jquery, Ajax and C#
Hi I am trying to use Jquery to do a simple Ajax post to the server but I don't know how to it really. In the function ready method I bind a click event to a button like this: $("#btnSave").click(function(event) { $.post("FlashCardQuiz.aspx.cs", { name: "test" }); }); So when it is clicked I want to send that "test" value to the server. Now I don't know how to grab this value on the server side. Like I would like to grab the value "test" from the name variable and then hold it into a string variable
[jQuery] Sortable blocks all other events
Hi, I upgraded to jquery-ui 1.5 today. I use accordion style navigations and some other simple effects inside sortable boxs. But now other effects doesn't work. Even clicking a simple link returns false so links doesn't work. If I remove sortable everything works fine. Is there any known problem with sortables?
[jQuery] Using AJAX load() method to get new pages only works sometimes in Firefox - why?
Hi all, I have a page that uses the load() method to pull in new pages without refreshing the entire document. In the ASP source I have conditionals which display only the contents of a certain div if the request came via AJAX. This works for certain pages on my site, but other pages seem to just, well, 'go nuts' - the viewport goes blank and the browser doesn't pull in any content. This only seems to affect Firefox. IE6 and 7 seem to work. Furthermore, the first time this happens, in the Firebug
[jQuery] attribute is null
i am wanting to grab the next href attribute from a clicked anchor, when i use the code below i get everything in between the div next to the selected one; var nextHref = $(this).parent("div").next("div").html(); but when i try to get the href i get null. var nextHref = $(this).parent("div").next("div a").attr("href"); can anyone tell me what i am doing wrong? <div style='width: 496px; text-align:left;'><div style='display:inline;'> <a class='thickbox' rel='facebox' href='http://robing.co.nz/ jquery/xhibit/display_page.htm'
[jQuery] select option name attribute
How do I retrieve the name attribute of a selected option using jquery. IE: <select name="textselector"> <option name="11">Text</option> <option name="12">Text 2</option> </select> In this example, I would be trying to get 12 when the "Text" option is selected. -- View this message in context: http://www.nabble.com/select-option-name-attribute-tp18124154s27240p18124154.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Neat site using jQuery
<a href="http://photoblog.flanisoft.at/">http://photoblog.flanisoft.at/</a> It was one of the featured on SmashingMagazines content for style switching. Lot's of nifty effects. <a href="http://www.smashingmagazine.com/2008/06/25/style-switchers-contest-results/">http://www.smashingmagazine.com/2008/06/25/style-switchers-contest-results/</a> I bet a bunch of these use jQuery. Glen
[jQuery] Transversing ul and manipulating
I have a ul with sub ul. I want to grab just the li items and copy then make one long ul. They say i had 30 li items. I would like to take first 10 and make a ul then second 10 and make ul and third 10 and make ul. I tried to do it like this but it also grabs the sub ul not just the sub ul li's. $("#sitemap #map1").append($("#main-nav ul#nav").find("li").clone().slice(0,11)); $("#sitemap #map2").append($("#main-nav ul#nav").find("li").clone().slice(10,22)); $("#sitemap #map3").append($("#main-nav
[jQuery] how to popup a login box without leaving the current page?
Hi folks, I was wondering if there's an easy way or plugin to do the following (popping up a login box without leaving the current page. For example: If you go to http://www.moli.com/p/register (don't register), on the right hand side there's a big link that says Already a member? Login here. When you click Login here, a cool looking "popup" appears (the page is not refreshed). Any ideas on how to do this with jQuery? Youtube used to do this also when you would click "sign in" in certain places,
[jQuery] Load specific id on click
I have a page with an archive of all newsletters: http://ischagast.nl/janhekmanschool/nieuwsbrief/archief/ What I want is that when clicking a month the results of that month appear under the months just like this site: http://loweblog.com/archives/ I thought building that with jquery would be simple, something like this: $('#content_main div.weblog_archive li a').click(function() { $('div.article').load(this.href); return false }); This works good but I only want to load the div.article
[jQuery] How can i use condition "not exist"?
I know that it true if ( !($.cookie('test') ) { $.cookie('test', 'yes'); } but it now ork :)))) why???? :))
[jQuery] How to add event to $.get() result?
Hello all I have following: $(document).ready(function() { ... $(".bar").click(function(){ $.get("/foo" ,{foo:$(this).attr("test")}, function(data){$("#bar").html(data); // data = <a class="bar"/> }); }); ... } and html: <div id="bar"> <a class="bar"/> </div> It works fine at first! But, after the $.get(...). the onclick seems not registered on <a class="bar"/> Does anyone know how solve this?
[jQuery] jQuery Doing Comet
Here's some code I came up with for COMET based stuff. It has ways of dealing with memory usage! index.html ======== <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/ TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>jQuery Comet demo</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
[jQuery] A Pluggable jQuery Extension Architecture
Hello All, I have posted an article on which I would like some feedback. The article is entitled "A Pluggable jQuery Extension Architecture". I am a developer on the WYMeditor semantic XHTML editor team and we are working on a new architecture for the software. We have built the editor on jQuery and are working towards a more mature design. You can check out the article at http://blog.skybluecanvas.com I'm not trolling here, I sincerely want your input. Thanks, Scott
[jQuery] Can anyone help me with this Superfish problem?
Hello everyone, I am new to teh boards here and wanted to thank everyone for any help that might come my way... Now then,I am having a problem with the display of the Superfish navigation script and was wondering of anyone could help me out. The site is here: www.chicagodance.com/ChiDance/index.html The menu works fine in everything except...wait for it....IE6 +!!!! Please help and thank you in advance, _delic
[jQuery] How to learn Queries
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ http:\\lakshmiraiprofile.blogspot.com $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
[jQuery] Validation plugin help please
Hi. I tried posting this to the plugin group days ago but it's not showing and I'm not sure if it's every going to show. My form disappears when the focus changes between form fields. Here's an example: ------------------------------------------------------------------------------ <script type="text/javascript"> $(document).ready(function() { var errorBox=$("div ul li div.duh"); $("#theForm").validate({ rules: { input1: { required: true, number: true } }, messages: { input1: 'input1 error' }, errorContainer:
[jQuery] Best autocomplete plugin?
Hi folks, long time no chat ;) I'm redeveloping my site finally and am looking to update a few core jquery plugins. The current autocomplete I'm using is jorn's version, at least a year old. I came back to the jquery site to get the newest version, but I discovered that there are now several other versions. Can anyone chime in with their experiences on the autocomplete plugins? Is Jorn's newest version still the best way to go? Thanks! -Kim
[jQuery] jQValidation with jQForm, it is possible?
Hi, I need validate a form (i use jquery validatin), with this no problem, but the idea was be send all data using jquery form, but I can't do work all at the time... my idea is... $("#myform").validate(); $('#myForm').ajaxForm(function() { alert("Correct"); }); this code don't work, exist any way for do this? any example? thanks
[jQuery] [validate] Manual submit with submitHandler question
Hi, Whenever a form is correctly validated, I want to change my submit button into an ajax-like image. $("#form_register").validate({ submitHandler: function(form) { $("#button").html( " '<?php echo $this- baseUrl; ?>/public/images/ajax/ajax-loader-32.gif' " + "class='no-border'> Registration in progress..." ); }, The problem is that the form isn't submitted, I tried also to add return true, it has no effect and if I add $(form).submit() I have in firebug an error 'too much
[jQuery] Trying to use jQuery and lightview on the same page
I am trying to use lightview and jQuery on the same page (doing different things). However the second I added the jQuery.js file to my headers my lightview broke with this error: "uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIDOMXPathEvaluator.evaluate]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://cgp.pezmc.com/includes/js/prototype.js :: anonymous :: line 1" data: no]" Now just the jQuery effects work
[jQuery] select dropdown with icons
Is it possible to replace a select box with custom html at all. I'm sure I've seen a jquery script that will do it, but can't find it after looking for 3 hours. can anyone help? basically i want a select menu in a form, and when you click it to drop down, i'd like {icon} - option name {icon} - option name etc.
Next Page