having link trigger 2 events
Ok so I am using the jQuery tabs UI addon. I am trying to accomplish the following, I have content in a tab, the tab is towards the bottom of the page. I want the link to activate a specific tab, then go to the area where the tab is, just how an anchor link would work. $(function() { $('#container-1 > ul').tabs(); $('#reviewLink').click(function() { $('#container-1 > ul').tabs('select', 1); $("#reviewArea").trigger('click'); return false; }); }); so right
[jQuery] Event registered for a class does not work with all members of class
Hello, I don't know wether it is the right place for this question but I am going to ask it anyway. I used jquery on my site and I registered a function on all of the nodes of a certain class like this: $('.up').click(function(){ /* do stuff*/ }); The interesting thing about it is that this assignment of the function to the event only appears to work with some of the elements. I have a div container on the left containing elements classed ".up". If ".up" is clicked I then go, clone the element and
how to use plugin facebox
Hi everyone, I would like to create an effect related to this one : go to http://labs.revyver.com/ then clik on a icone a new panel pop up, including html/css file It seems that the webmaster uses the plugin facebox for Jquery In a nutshell, I would like to open a remote html/css file with the index remaining in the background Can someone explain me how to use this plugin please ! I've found some doc on the web, but it's hard for me ps: I don't know javascript nor jquery language ( i know html/css/php
[jQuery] jquery validation on remote rule requires two submits
I am using the validate plugin with a form that has one select element and no other elements. I am using the required and remote rules to validate this element. When I click submit the first time, it performs the remote validation, but doesn't submit the form. A second click on the submit button then submits the form. I'm trying to figure out why it's not submitting on the first click? The code below shows both client and server side action. I am seeing on the first click that remote.php returns
[jQuery] Superfish menu questions/problem
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> I have just started using superfish on our site <a href="http://christianmotorsports.com">http://christianmotorsports.com</a><div>I am not a programmer so getting beyond the basic selection options and pasting in custom css code etc. is not clear to me. I have gone through and edited some existing css code for the general template on the site.</div><div>This is the initial problem that I
[jQuery] What is IE7 barfing at this js?
<html> <body> Hi folks, The following snippet processes a JSON string sent back to the browser (it is part of a poll) <tt>function loadResults(data) { var OPT_VOTES = 2; var total_votes = 0; for (id in data) { total_votes = total_votes+parseInt(data[id][OPT_VOTES]); <x-tab> </x-tab><x-tab> </x-tab> alert("total_votes="+total_votes+" --- " + data[id][OPT_VOTES]); } } The JSON string looks like this... </tt><pre>[["1","High cost","23","What is the biggest challenge to recycling
[jQuery] [plugins] Form - Success function fires multiple x's
I am using the ajaxForm() to submit a form and the success function that is defined in the options array is firing 3 times. Any ideas? Code: var options = { target: '.updateStatus', beforeSubmit: updStatus, success: showResponse, url: 'saveAdmin.php', type: 'post' }; $('.editProviderType').ajaxForm(options); //updStatus Func() function updStatus(formData, jqForm, options) { $('form.editProviderType').slideUp(); var spanName = 'span#TypeName'+formData[3]['value']; $(spanName).text(formData[0]['value']);
[jQuery] animate() syntax question
hi friends, i've had this question lying for so long in the bottom of my mind, i thought i should finally clear it up: I'm using a lot the animate() function, using a callback, and no easing parameter. Such as: $('div').animate({width: 400},'fast', function(){ $(this).addClass('visible'); }); i 'm wondering if i should actually leave an empty argument for the easing parameter (because i want the "linear" easing method) $('div').animate({width: 400},'fast',null, function(){ $(this).addClass('visible');
[jQuery] $.getJSON not returning specified count
Hi, I was trying to get 10 items from the json file. My url in $.getJSON looks like: $.getJSON("myjsonfile.json?count=10", {}, function(data) { $.each(data, function(i, item) { alert(item.title); alert(i); }); }); But the above code returns all 20 items from my file. What mistakes am I making?
[jQuery] Getting a menu item Li to do 2 things at once? onclick AND regular href trigger?
Hi... just starting out to get this going. I'm guessing that the reason onclick code has the #, for example: <a href="#" onclick="someFunction.add "etc code etc etc" ></a> is because it can't do the onclick AND more typical things like this example: <li><a href="#myID"></a></li> Is because they conflict... SOooooo! I have my Li/ul menu code doing a bunch of scrollto stuff. Took weeks to figure out. NOW I need to have the SAME menu, when I click on the Li's bring up a different flv video for each
[jQuery] loading a DOM fragment via ajax
Hello Friends, say i have a html file containing a #viewPort div, with a series of divs each containing an h4 tag. If the file was not external, i would simply select what i need like this: $('#dsViewport h3'); Now, it is an external file, so my question is: is it possible to load this file via $.load("myfile.php#dsViewport h3"); or is the syntax different, or not possible at all ? Thank you for your insight, Alexandre
[jQuery] Calling functions
I'm a complete newbie to jQuery and am trying to use farbtastic (a jquery colour picker) The documentation suggests calling the function on document load: <script type="text/javascript"> $(document).ready(function() { $('#colorpicker').farbtastic('#color'); }); </script> However I am loading the associated elements: <form> <input type="text" id="color" name="color" value="#123456" /> </form> <div id="colorpicker"> </div> from an html file using: function paint() { $("#mid").load("paint.htm"); } </script>
[jQuery] ajaxStart don't work for ajax/load?
hi i want to show/hide a loader when using load() function but using .ajaxStart / .ajaxStop functions doesn't work. Is it right? With this script: $('#load') .ajaxStart(function() { $(this).show(); }) .ajaxStop(function() { $(this).hide(); }); $('#colCont').load('myFile.php?id=myId #colContIns'); $('#categorie a').click(function(){ var id = $(this).attr('id'); var s = new Array(); s = id.split('_'); $('#colCont').load('prodotti/ famiglie.php?id='+s[1]+' #colContIns'); return false; }); the loader
[jQuery] corner plugin ie7 bug
i i got a weird error using the jquery.corner plugin on ie7. I attached two image. The wrong one is how the page appears in ie7 (look at the red square on the right where the corner get), the right one is for all the other browser..(ie6 included..!!!) http://www.azero.it/checkImg/tasker_wrong.jpg http://www.azero.it/checkImg/tasker_right.jpg here's the css rule for that block.. .blocchi{background:#dcdcdc;margin:10px 10px 0 10px;overflow:hidden;padding:10px 10px 40px;width:840px;} it works right
[jQuery] HOW: jQuery AJAX to replace iFRAME
Hi Currently my page has a iFrame (loads an external web-page) in it. I have seen this tutorial that uses simple AJAX to replace this iFrame. http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm (see the small DEMO, I want exactly the same with just 2 Links) My question is - How can I do the same using jQuery's AJAX to do the same ? Thats is, when these 2 Button/Link hit, it will fetch corresponding remote html and paste it in a DIV. Thats it. Please do reply..... Ayan Debnath INDIA.
[jQuery] rounded corners
have uploaded all files to root, script not executing. please help, thanks. <script type="text/javascript" src="jquery-1.2.6.min.js"></ script> <script type="text/javascript" src="jquery.corners.min.js"></script> <script type="text/javascript"> <div style="background-color:#acc; padding:10px" class="rounded {10px}"> class="rounded {10px}" </div> <script>$(document).ready( function(){ $('.rounded').corners("4px"); });</script>
[jQuery] Plugin that highlights divs
Hi, I've seen a Jquery plugin before that triggers an event which pulsates or highlights a div of your choice. I've also seen the plugin "scroll" the page to the correct div. Does anybody know what this plugin is called? I'd really like to use it... I've been searching the plugins directory for a while, but can't seem to find it! Thanks
[jQuery] Superfish - Nav-bar style with bgIframe?
We've been using Superfish for our menu, but bgIframe doesn't seem to solve our IE 6 issues. The test browser: Internet Explorer 6.0.2600 Windows XP Professional (No Service Packs) The initiation: $(document).ready(function(){ $("ul#sf-menu-id").superfish({ autoArrows: false, pathClass: 'current' }).find('ul').bgIframe(); }); Example broken page: http://www.farmanddairy.com/recipes/submit-recipe The menu goes behind several of the inputs. This happens across the site in different places; It even
[jQuery] Why isn't the name attr in this code incrementing?
Hi, all... I'm cloning a section of code to create additional image inputs in a form, along with a yes/no select field. When the cloning occurs, I also need to increment the field names of the select statement (main-photo-1, main-photo-2, etc.), and the file input field (image-upload-1, image-upload-2, etc.) Here's the HTML: <div id="image-input"> <div id="image-div-1"> Is this photo the main property photo?
[jQuery] Anyone have any ideas on why this code doesn't increment properly?
I've got this jQuery: $(document).ready(function() { $('#add-image').click(function() { $('#image-div-1').clone(true) .attr('id', function() { return this.id.replace(/(.+)(\d+$)/, function(s, p1, p2) { return p1 + (parseInt(p2, 10) + 1); }) }) .appendTo('#image-input'); $('#main-photo-next:last').attr('name', function() { return $(this).attr('name').replace(/(.+)(\d+$)/, function(s, p1, p2) { return p1 + (parseInt(p2, 10) + 1); }) });
[jQuery] livequery matchedFn scope?
Sorry to bother folks with what is probably a silly question, but I can't quite figure out the scope for livequery matched functions. For example, if I have the following: $("#id:not(.inactive)").livequery(function() {alert(this);}) Then the alert shows <this> to be the matched selector, which is what I would expect. But if I have the following: $("#id").not(.inactive).livequery(function() {alert(this);}) Then the alert shows <this> to be the entire document. What's the reason for the difference
[jQuery] pass variable from button click to iframe
I am currently grabbing data from a mysql db and presenting it to the user in a table. In certain cases, a volunteer button is displayed to the user. I want the user to click on the volunteer button, and have an iframe dialog pop up. When the user clicks on this volunteer button, the corresponding "date" column should be passed to the iframe (which in turn uses the iframe to look up the correct data in another db). I can't seem to figure out how to pass the "date" variable. here is part of my php
[jQuery] rounded corners plug in
i've loaded all js files to root. script not executing. help please. thanks. <script type="text/javascript" src="jquery-1.2.6.min.js"></ script> <script type="text/javascript" src="jquery.corners.min.js"></script> <script type="text/javascript"> <div style="background-color:#acc; padding:10px" class="rounded {10px}"> class="rounded {10px}" </div> <script>$(document).ready( function(){ $('.rounded').corners("4px"); });</script>
[jQuery] [tooltip] - Hover over tooltip so you can add a link
This is an easy way to hack Jorn's tooltip so you may hover over the tooltip and click on a link: http://www.artworknotavailable.com/2008/12/27/jorn-zaefferers-tooltip-hacks/ hack of: http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
[jQuery] [autocomplete] Pressing Enter submits the form. Please Help
Hi, thanks for the great plugin! I'm having some problems here on Firefox 3 and Safari: When adding autocomplete to a field everything works fine, except that the form gets submitted when I select a entry from the list and press Enter. If I put a onsubmit = "return false;" in my form, nothing happens at all and firebug doesn't show any errors. I also googled a lot and some people seem to have the same problem, but I didn't find any solution. Here's my form HTML: <form action="/people" class="new_person"
[jQuery] jQuery.getJSON Current Url Prefixed
hi am using jQuery.getJSON to request a cross-domain page using the following code jQuery.getJSON(crossDomainUrl, function(result) { processResult(result); }); but i never reach the cross domain url as the current url is always prefixed to it, like so Current Page Url : http://localhost/page.aspx Cross Domain Url : http://remoteServer getJSON final request url is : http://localhost/page.aspxhttp://remoteServer so i always get a 404 error can you please tell me why is this happening thanks -- View
[jQuery] bind add hash to url to an existing function
Hey, I am a designer who is redesigning my portfolio and incorporating some jQuery on the new site. I have a function that acts to filter some items on a page. I would like to also be able to link into the page and have it already filter the results. Here is the page: http://www.jlanedesign.com/download/jld_new/code/projects/ If you click any one of the inline list items near the top: web design, web dev, print, branding, photography, they have an onclick function that hides the other options. What
[jQuery] [jCarousel] fetching the script with a PHP function?
I love this little and flexible script. The problem i got is that i'd like to fetch it with a PHP function instead of a plain HTNL address, but i cannot figure out how to do this. to explain it better, i've a php function called tep_image() wich supplied with an image address can create a thumbnail of the size i need, and i'd like the script to work with this script. Any clue?
clearing xml object or traversing fix needed
The code below works fine except the xml code returned by 'data' doesn't seem to reset itself with clicks on new lines. If I alert out the value of "snip_content" it DOES change with new clicks, but the inserted text in the insertAtCaret() function does not change...it always shows the first value of snip_content from the first click. It feels to me kinda like the xlm is being appended or somewhere else a var is not being reset. I've tried resetting with every function and re assignment I can think
[jQuery] Table Sorter - Problem sorting numbers with comma seperators
Hi! it`s me again, I`m new using tablesroter and I don´t know how to solve this problem of sorting numbers with comma separators(it doesn`t sort well), I`ve been looking everywhere but I didn`t get a solution. Can anybody help me?? Thanks Sole.
[jQuery] Tablesorter, problems ordering numbers
Hello, I have a tablesorter with a numeric column (the type is String so I have to use a parser to order the column as number ), the problem is that it does not order long numbers with comas separator. Here is the example of the sorted column: desc order--> -363,122,000.00; -28,000.00; 3,364,000.00; 10,000.00; 68,000.00 asc order--> 68,000.00; 10,000.00; 3,364,000.00;
[jQuery] Extend Joomla Simplify with the superfishmenu!!!
Hello, can anybody tell me where i should copy the extended files of the ZIP- file "mod_superfishmenu.zip"? I want to use the "basic-style" menu in my Joomla simplify-template. I don't know exactly where I have to copy the files of teh ZIP-file to my simplify template. Does anybody also know how I can integrate the menu if i copied the files to the right place? Thx, Ben
[jQuery] jCarousel
Hi thanks Torstein for your reply on my personal Mail ID regarding using Hi-slide along side jCarousel , what i would like to know is a) jCarousel displays only three images in the scroll can i increase it to to say five b) when i use Hi-slide as my default gallery viewer will all the functions of Hi-slide come into effect?? do i have to d\enable it with some script apart from what you have suggested in my mail see below <snippet> First, add the JS and the CSS for the page like in the Highslide download
[jQuery] Querying XML with jQuery in IE6
Hi all. I'm trying to get some values from an XML document in jQuery but lack of a (good) debugger in IE6 means that I can't figure this out. The XML is simple: XML: <Tests> <Test name="Help"> <json><![CDATA[help.json]]></json> </Test> <Test name="telia-big-box"> <json><![CDATA[telia-big-box.json]]></json>
[jQuery] Refactoring problem with jquery-selectors
Hey guys, i am having problems with some refactoring: I have some html-tables to which i add an onclick-handler like this: CODE: addClickHandler('myTableID',myFunction); 'addClickHandler' looks like this: CODE: function addClickHandler(tableId, functionName) { jQuery('#' + tableId + ' ' + 'tbody').children('tr').click (functionName); } Now, all the functions i pass to this onclick-Handler look almost the same : CODE: function clickOnTableRowResultSet() { var row = jQuery(this); var
[jQuery] jcarousel autostart
could anyone please explain how to start/stop autoscrolling of the jcarousel by clicking on an external link on the page?
[jQuery] Hiding a div with content loaded via .load function
Hello. I am trying to load a login form into the #login_pop_box div via the .load function: $('#login_pop_box').hide(); $('a#login_pop_box_on').click(function() { $('#login_pop_box').load('ajax/login_global'); $('#login_pop_box').fadeIn('400'); }); $('a#login_pop_box_off').click(function() { $(this).parents('#login_pop_box').fadeOut('300'); }) This works, but when I try to cose the window with a link contained in the content I just loaded, nothing happens. Here
[jQuery] HttpHandler not returning JSON data
Hi All, I was working with a basic example where I wanted to get JSON data from the HttpHandler. My javascript code looks like: $.ajax({ url: 'Handler1.ashx', type: 'POST', data: { name: 'MyName' }, contextType: 'application/json; charset=utf-8', dataType: 'json', success: function(data) { alert("Data Saved " + data.name); } }); My Handler1.ashx code looks like: context.Response.ContentType = "application/json"; string results = "{ 'name': '"+ context.Request.Params["name"] +"' }"; context.Response.Write(results);
[jQuery] How do I cache
I would like to have a registration form cached for 1 year public and private. How do i go about it. Thats what I tried and register.html was not cached. jq.ajax({ type: "POST", url: "http://www.example.com/register.html", dataType: "html", cache: true, success: function(response) {} }); ================================= content of register.html <div> <form name="registerForm" method="post" onsubmit="return false;" autocomplete="off"> <input type="text" name="username" id="username"
[jQuery] applying css style to past dates
Hi, I'm trying to make text red when a date in an input field occurs in the past. However, it isn't working when I try it out.. I'm new to JQuery, so i'm not sure what i'm doing wrong.. $(document).ready(function(){ $(".date:text").each(function (i) { if(parse(this.value) < Date.getTime()) { this.style.color = "red"; } }); }); This is one of the input fields that I want it to turn red. <input class="date" type="text" value="11/17/2008"
Next Page