Using two different plugins
Are all plugins compatible? I have a site which uses Slidedeck which uses javascript but I am not sure if it is an official plug in yet. Lower down the site I want to have a scrolling portfolio which uses the JQuery Plugin Serial Scroll. I have tried having both in the same webpage and the scroll seems to mess up the slide deck. Not sure if this is due to CSS conflicts with similar labels being used or if it is due to the scripts just not working together. Any ideas? Thanks
Possible fadein bug?
Hi guys, I've worked with Jquery for a while now so I'm quite confident with the ins and outs. However I've come across something that's got me stumped. I'm in the process of creating a website for a record label, and have designed the site in such a way that there is only one actual page and that each individual "page" is simply a div that fades in and out along with its own individual background. The problem that I've come across is that upon first arriving at the site the front "page" fades in
How to move mouse dynamically using jQuery
Hi, I have a query related Mouse moving activity. If i get x,y co-ordinates, i have to move mouse dynamically. could you please help me ? I am new to jQuery and this forum also.
[SOLVED] Button to load data into form
I have a table with a load of stuff from a database. At the end of each row I have an edit and delete button. The delete button works magically, however I am trying to get the edit button to load data into a form above the table to be edited. This is what I have so far. $(".editbtn").click(function () { if ($(this).attr("src") == "images/edit.png") { $("#add").slideUp("slow"); $("#addform").slideUp("slow"); id = $(this).parents("tr:first").attr("id");
border around tr not totally filled
Hello all, I'm developing a search feature to the following website: http://www.portalcirurgiaplastica.com.br/CF/clinicFinder.php?state=MG As you can see, the table has a mouseover effect that paints the current hovered row's border. Because I couldn't find any way of drawing a border around the tr only, I had to set all <td> borders white and after that set the top and bottom borders of all <td>'s pink. The first td is set to left border pink and the last one of the row receives right border pink.
Add new Form blocks
Hi, Please help me on how to get it working... I have a form with several fields. One or many of the fields require "add more" feature. Like I have a file upload feature, where user can dynamically create another upload button by clicking on Add another file button in the same way delete the existing ones. Also in the same form I may have many such "Add more" form fields options. Kindly help me on getting this working using jQuery... Thanks in advance... TNS
Click one of 2 images, one become colored another one grey out
How to do when i Click one of 2 images, one become colored another one grey out?? pls tell me as many methods as possible also, if these two images has same class, can i archieve this effects using $(selector).each(function(){ }) ?? thanks thanks in advance
Time to slideDown
Hi i have a question $(document).ready(function() { $('ul > li > a').mouseenter( function() { if ($(this).next().is('.pulldown') ) { $(this).next().stop(true, true); $(this).next().delay(200).slideDown(100); } }); $('ul > li > a').mouseleave( function() { if ($(this).next().is('.pulldown') ) { $(this).next().delay(0).slideUp('fast'); } }); $('.pulldown').mouseenter( function() { $(this).stop(true,
confused about JSONP
Hi If I open the console on any jQuery-enabled page and type: $('<div/>').load('http://picasaweb.google.com/data/feed/api/user/agota64?alt=json-in-script', function(res){alert(res);}) obviously I get a bunch of JSON delivered cross-domain. As I understand it, this is using the JSONP method for cross-domain requests. If I understand correctly, this involves jQuery creating a script element and setting it's src attribute to the url concerned, thus overcoming the cross-domain problems of XMLHttpRequest.
Cannot retrieve an element farther up the DOM.
JQuery 1.4 I cannot get this line to return anything but null: alert($(this).closest("div.cr").html()); Any ideas on why not? I have tried using parents("div.cr:first") with no luck as well. Thanks! Randy Here is my sample code. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>
Keyboard accessible jquery
Hello, I have a drop down menu that needs to be keyboard friendly. At the moment I use 2 events: FocusIn MouseDown If a user tabs through a document and tabs onto the menu it drops down. If a user clicks on the menu it drops down. The problem is that if I click on the menu, it also fires the focus event. If I remove the focus event from the code everything works fine except for keyboard navigation. How do I prevent a focus event from firing after a click event? Heres an example:
Show/Hide Problem
Hi, I put together the following snippet, but it doesn't work quite right. I'm trying to allow the user to click an image on the page and show some HTML that was originally hidden. Basically a typical expand/collapse thing... The user clicks an image on my page and the below code runs: // if it's NOT visible if(!$('.row').is(':visible') ) { $('#imgButton').attr("src","images/icon_minus.gif"); $('.row').show(); } else {
How to pass global variables to the jquery scope
Hello everyone I'm having trouble letting functions I defined in jquery read javascript global variables I defined elsewhere.. for example I have a function defined within my jquery $(document).ready(function(){ function performTabSlide() { // do something with currentPosition; } elsewhere the page I defined the variable currentPosition and assigned it a value from php.. document.body.onload=retreiveCurrentPosition(); function retreiveCurrentPosition() { currentPosition=<?=$currentTab?>;
Problem with multiple selectors all changing each other
Hello all, I am working on a customised scoresheet for a Bible Quiz group. Basically, I want to click on a box and have a box come up with options for correct and incorrect. I just want it to affect the score for that one box. However, if you click another box, it changes all of the boxes. Here's an example. http://mipearson.com/mscore/index.php?question=4 Click the 10, 20, or 30 in the top left corner. It should update the points under the 4. Click on any of the boxes assigned to a person on the
jQuery Deconstructed: a visual, interactive breakdown of the internal code
I've been interested in the internal structure of jQuery for as long as I can remember, but it can be overwhelming at the best of times, so I've recently made-good on my plans to create a visual, interactive breakdown of the physical code: http://www.keyframesandcode.com/code/development/javascript/jquery/jquery-deconstructed/ The entire page is interactive, from the main code blocks, links to the API documentation, right down to inter-document method hyperlinks in the actual JavaScript. Feel free
Load image into a div
How can I complete this code below to make the image links show up inside the div? Also, if the div already has an image inside it, then clicking a new image link should replace the current contents of the div. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Load image into div</title> <script type="text/javascript"
jquery and javascript
They don't seem to be playing nice together, or I'm doing something wrong..?? This function keeps returning "undefined" when I can see the json data correctly. At first I thought it's a global var issue with javascript, but I think I'm declaring "rPiece" properly. Do I have to send "rPiece" to and from the XHR request? I also tried setting "rPiece" outside the function with no luck. Please help. Thank you. Here's the function: function fnFormatDetails(){ var rPiece; $.post("../i/php/autos-exe.php",
jQuery element creation - efficiency question
Are there really any strategic or efficiency differences between using the following: #1) var formEl = $('<form id="merchant_form" autocomplete="off" method="post" action="" />'); or #2) var formEl = $('<form />'); formEl.attr({ 'id': 'merchant_form', 'autocomplete': 'off', 'method': 'post', 'action': '' }); Thanks for the 'input'
Superfish - problems with 'current' and with navbar style
I tried the superfish examples on Joel Birch's site (http://users.tpg.com.au/j_birch) as I was looking for a navbar style similar but simpler than one of my homegrown ones (www.northcountyrugby.com) . Plus I wanted to get rid of frames from this site - therefore a general cleanup. Unfortunately I've run into problems with the 'current' item and with the navbar style. When not using superfish-navbar.css but with pathClass: 'current' (i.e. just standard) the effect is that after selecting an item
passing variables into an inline function...[solved]
Hello all, I am trying to use jQuery to populate a number of divs with html from external blog pages: for(var i = 1;i<=3;i++){ $.get("http://my.project.url/?cat=whatever&pag="+i,function(data){ $("#whatever_div_"+i).html(data); }); } I understand that the 'i' variable is out of the scope of the inline function but I really don't know any other way of doing this. Can anyone help me pass i into the function please? Thank you Paul
How to select input from array of inputs like articles[]?
Hello all, I am creating table with input fields. I dynamically add new rows to the table with the following code jQuery(\"input[name='add_new_row']\").live('click', function(event) { var row = jQuery('#mm_list >tbody >tr').length+1; jQuery(\"#mm_list > tbody\").append(\"<tr><td>\"+row+\"</td><td><input type='text' name='articles[]' style='width:98%'/></td></tr>\"); });now I would like also to add autocompleter on newly created input. I do not know how to select newly created input with
Using two versions of jquery?
Here's my problem ... I developed a pseudo jquery plugin around 1.4.2 for a Drupal install.... but now I realize that Drupal comes with version 1.2.6, but I can upgrade it to 1.3.2. I cannot simply update it because it will break a ton of modules within drupal. Is there a way to use both versions? Just call them differently?
counting tags inside a <iframe>
Hi, I am a newbie to jquery i want to count some tags inside a <iframe>. The iframe src is like this <iframe src="http://mysite.com/testing.php?id=7632762"></iframe> the php file included in the source contains several include files and more php kinda script finally a html output is generated.How to count the tags this generated html ?? -Thank you.
Problem with using variable as animate()'s properties
Hi, I'm writing this script and apparently the animate method wouldnt interpret the variable I passed in the properties section: //it's hover event, and this is the mouseover function () { direction = $(this).find('img').attr('class'); //should be either top, bottom, left or right value = ((direction =='top' || direction=='bottom') ? $(this).find('img').outerHeight() * -1 : $(this).find('img').outerWidth() * -1); $(this).find('img').stop().animate({direction: value} ,{duration:500,
How to select the 2nd child of a 'closest' parent?
Hello all. I am trying to figure out the syntax for the following. For this version I am simply trying to select the 2nd child of the SLIDE HOLDER div. For this test I am just making the width grow. My next pass will be to get the index of the DOT clicked and then pass it to the child of the other parent. Please see line 24. I know this is incorrect but placed it to give you an idea of what I am trying to accomplish. Thanks!! <div class="slide_holder"> <div class="slide">XXX</div> <div class="slide">I
modify content into a dynamic generated table?
Hi! I have a problem and I don't know to solve it: I create in jquery a dynamic table and populate from a recordset with data. After that I want to modify some cell in this table to add new data (don't want to add new rows) ... How can I do that..? I found on the internet livequery plug-in but still not working... Thank you!
Image rollover needs to change when parent li/div is in hover state
I need some help with an image rollover script. Iam using the following to trigger the rollover of thumbnails and that is fine for most instances in the site however I need something similar to this but expanded so that the script is functional in the sense that when the parent li or div element is rolled over the child image changes to the rollover state. I am using css to change the color of the text when the parent element is in its hover state but it would be good if the script could handle this
Is it the best way to do a Twitter-like-signin-box ?
Hi everyone, I have done what I call a Twitter-like-signin-box (if you don't know what it looks like, go to www.twitter.com), at first it was pretty easy, I click on a button, the box (the form) opens and when I click on it again, the box closes. But when I add the fact that the box have to close if it's open and I click everywhere else the box, I had to use the $('*') and I don't know if there is a better method. Here my HTML (simplify) : <div id="signin_btn"> <a href="/inscription.html">create_account</a>
ie combox bug
Hello, In my form using jquery and ajax on update values should be pulled through, but in ie any field in a combox isnt being pulled through and is null. however the code still works in opera, firefox and chrome. anyone have this bug before? cheers
change event not firing after pragmatic changes
I've noticed that the change event isn't being fired for me on form elements when the changes are made pragmatically (eg, using the attr() method). For instance, a checkbox's change event fires if I click it, but not if I use .attr('checked', false); I'm using jQuery 1.4.2 and Firefox 3.6.6. I did notice that the native event handler (as in, adding an onClick attribute to the element manually) doesn't work either, so evidently this is NOT a bug in jQuery. I just wonder if anyone knows a way around
Need to click several times on links in Firefox with jQuery animation
Hi, Our site was using jQuery animation on links. We noticed that FF sometimes needed additional clicks to navigate, whereas IE did not. We unfortunately had to remove the jQuery animation because of this. We were doing this: $("#rss.CssMO").removeClass("CssMO").mouseenter(function(e){ var $this=$(this); $this.children("img").stop(true,true).fadeOut(); }).mouseleave(function(e){ var $this=$(this); $this.children("img").stop(true,true).fadeIn(); }).click(function(e){
navigation next prev
hi there,I'm trying to use the scrollTo plug in, maybe in the stupidest way, but i feel i'm almost there! in my case every scrollable element has his own next-prev buttons, the script is able to extract a variable on the button click, id like to make him use it to calcolate the position of the next-prev target. you can take a look to a live example at http://www.500-1.omnigrafica.it here's the script i've made: $(document).ready(function () { $('.triangolo_top, ') .click(function () { var
Need Help to submit form with jquery & ajax
Hello im trying to submit a form by ajax but i have a problem i generate 1 form with same class with php for each product i have in my DBase so all have the same class and jquery submit is working fine but only submit the 1st form this is my function: $(document).ready(function(){ $(".formulario").submit(function() { // we want to store the values from the form input box, then send via ajax below var idc = $('.idc').attr('value'); var idp = $('.idp').attr('value'); var
Hover + slideToggle bouncing up and down
Hi, i have a navigation menu which is supposed to slide in on mouseenter and slide out on mouseleave. I currently have this code: $("parent-element").hover( function() { $(this).find("child-element").slideToggle("slow"); } );This works fine, except if you move your mouse over the child-element before the animation is complete. Then it gets stuck in an endless bouncing up and down loop. Tried so many different possibilities with flagging the element while it was animating,
Trying to reload a div with dynamic content from main page when closing a fancybox
Hello, I'm trying to reload a div on a main page when I edit the dynamic content in a fancybox. The main page is made of an included php files. I thought I would be able to reload it: html on main page: <div class="contact_ct"> <h1><? echo "$text_title_cttech"; ?></h1> <a href="admin_contact_e.php?id=<? echo "$id_ct_tech"; ?>" class="edit_ct"> <img src="img/but_edit.png" class="imgedit"></a> <? include("admin_inc_admin_inc_ct.php"); ?> </div> Javascript: $(".edit_cf").fancybox({
finish an animation and the stop!?
Hi, I am very new to JQuery and I have a little question. I have serveral DIV-Containers on my site and I added to each an .mouseenter and .mouseleave event: $(document).ready(function() { $('div.Menu').mouseenter ( function() { $(this).children(".NaviHeader").animate({fontSize: 30,left: 50}, 'slow', 'easeOutBack'); $(this).children(".NaviSubHeader").animate({fontSize: 15,left: 50, top: 30}, 'slow', 'easeOutBack'); } ); $('div.Menu').mouseleave
Qustion: using 'this' in click()
when using "this" in object.click( function(){ ... } ) "this" referes to "object". here is some code I wanna call fnHide() in click() and i don't want to use ...oTip.fnHide() what can i do? oTip: { _bToBeAppended: true, //初始化用,勿改 oTipPanel: {}, //oTip的jQuery对象 nFadeOutTime: 250, //淡出所用时间 /* * Function: fnShowTip * Purpose: 在页面右上角显示提示框 * Returns: object:oTip - 提示框的jQuery对象 * Inputs: string:sHtml - 提示框内容的HTML代码 * [number:nLiveTime] - 显示时间(0表示一直显示) default:0 */ fnShow: function( sHtml, nLiveTime
How to listen to an object events ?
So, if the action was triggered is dbClick or hover or keypress etc, I can run a function with switch(event){} case hover : alert(event); case keyup : do nothing like this . is this possible ?
Form to upload images, input text and submit to designated titles
Hello everyone, I am interested to know if it is possible to create a jQuery plugin to do the following: Sign up/Sign in (using Facebook, Twitter, etc...) Open a form with multiple options, including: Upload image (resized to thumbnail and linked to open larger image) Enter title using drop menu (Country name, location, etc.) Enter description of image (140 characters or less) User star rating Submit User then submits form and the data gets transferred under specific country or region title. Maybe
(How) can I use window.opener with jQuery?
For years I have been using the JavaScript "window.opener.location.reload()" to refresh a parent window when a popup window has made changes to a database. I hoped I could refresh selectively using jQuery. So I created a function in the popup window, in which (some of) the code is: $.get( 'show-total.php', function ( info ) { window.opener.$( '#stop-press' ).html( info ); }); But it doesn't work, when called. I know that 'show-total.php' is called, because I had an error in it, and the error
Next Page