google code in new partial
I am new to jquery ajax and I have a Symfony site working with partials loaded into divs from a .post. The partials inherit scripts from the main page layout as well as using local and inline scripts. I am using google jsapi in the main page header to fetch jquery. Most of the other scripts ATM are from datatables and its plugins and they all work fine. I have Google visualization working fine on initial pages and I had it working well in new partials as they were reloaded. This has gradually stopped
.trigger("change") not working for some reason
Hi there, I have a textbox attached to an alert which I want to fire when the textbox value is changed i .e. while the user is typing. I attempted to use the .change() event handler unsuccessfully. After some searching I found that the .trigger("change") handler should work better but that too is not working. My coded example is quite simple: http://test-psi-alpha.appspot.com/jquery3 and consists of the following: HTML <label for="textbox1"> this should flash an alert when changed.</label>
.load() or .get not works in internet explorer 8
I'm developing a listing of workers, where the user can by department select through of tag select (html). But, my jQuery function not works in IE 8. function popularFuncDeptos(){ var sigla = $("#sel_depto").val(); if(sigla != "all"){ $("#listas").load('/ReconhecimentoNew/funcionario/depto/' +sigla+ ' #list_depto', function(){ $("#list_all").hide(); $("#list_depto").show(); }); } else {
Little bit of help with loops
Hey folks, was hoping someone could give me little hand with a loop function, I can't seem to get it right. I'm trying to do the following and I was wondering how it's done.Do I need to use the .each() function?: for(i=0; i<=10;i++) { $(document).ready(function(){ $(#myform").validate({ rules: { "field"+i: { required: true } //important bit } }); }); } How would I go about doing this in jQuery?
Thumbnails Out of Order on Reload of Page
Hi - I managed to integrate a gallery into my site using code provided here: Fresh Sliding Thumbnails Gallery with JQuery and PHP However, I noticed that even with their demo site (here), the thumbnails sometime come in out of order on the page when you hit the reload page button on the browser repeatedly. Based on what I read, the gallery relies on thumbs.php to create a JSON string with all the elements for the thumbnails. In the JavaScript (jquery.gallery.js), a buildThumbs() function gets the
Open Dialog - with current page
Hi there, my question if it´s posibly to dynamical open (without hardcode URL) the same page (current page) in a dialog? I need to have a link on every every page in a site (the link lives into a template) and I need to open this page again in a dialog box with the same content. Anyone know the trick?
a stange result after using getJson of Jquery
I found a stange result after using getJson of Jquery, pls see code as below: function checkCode(o) { var randomcode = ""; $.getJSON( "/Handler/GetCodeHandler.ashx", function (json) { $.each(json, function (i) { randomcode = json[i].code; }) }); //after getting the code through getJson, the result of below line is always true even if the two values are same... but if we add alert() before it, then it can work well, I am waitting for help:)
Updating MySQL table with a link click
I have a link that when I press it I want it to update a column in the MySQL table based on the ID of the "post". I don't want the URL to change and it needs to refresh back to the normal page. -S2
JQuery .html()
Hello All, I'm trying to highlight the pattern matched string in the text withing the pre tag. e.g. <div><pre> This is test html </pre></div> . The data within the pre tag is around 400KB. Also before highlighting I'm running the google prettify code as per my necessity. I'm using the code like following: highLtText = '[a-z]+' // any regular expression given by user in the input TextBox regEx = new RegExp('(' + highLtText + ')', "ig"); var preTextStr = $('pre').html(); changeTxt = preTextStr.replace(regEx,
'jQuery( html, [ ownerDocument ] ).find( selector )' always return [], why?
Hi, find method always return [], when calling with jQuery Object created by 'jQuery( html, [ ownerDocument ] )'. Is there any know bug? Here's the screenshot tested in jQuery 1.5.2 w/ Chrome 10 JS console.
Change text from a span, if a div is visible and change it back if the div gets hidden (.text() and .slideToggle)
Hi, I have a span. If the span gets clicked, a text toggles. If the span gets clicked again, the text disappears. I want to change the text of the span, each time it is clicked. An Example: the span says: Show text - when I click it, the text appears, now the span shall "say" hide text. this is my actual code: jQuery(document).ready(function($) { $('.single_content').hide(); $('.css_hide').show(); $('.show_content').click(function(){ var $this = $(this); var $single_content
$(document).ready(); not working in Safari, Chrome, and Opera
I have the following code below working only in Firefox. $(document).ready(function() { alert("here"); });Is there any know bug. I am using version 1.5.2
app closes
Hello I've made an app with phonegap which opens a webpage. I make a php page with jquery mobile and upload it to the address which I have written in phonegap. When open my app on the phone sees it fine, but when I want to write something in a form field shut it down. Someone who knows what I'm doing wrong? regards Michael
Why doesn't post return data?
$('#dataForm').submit(function() { var formData = $(this).serialize(); $.post('inc/insert.php', formData, function(data) { if(data == 1){ alert(data); } }, 'html'); });I think I have gone off my rocker this morning. I am coding a simple form post and the post works fine. The PHP echoes a 1 on success. I am doing (a post) this in another form (using blur instead of submit) and it works flawlessly. In Firebug there are no response headers
Problems with CDATA
Hi everyone, I Have. var xml = "<data><![CDATA[Text]]></data>"; try 1. alert($(xml).text()). Result - empty. try 1. alert($(xml).html()). Result - <data><!--<![CDATA[Text]]>--></data> How to get the text?
name="foo" format not working?
Hi, I'm trying to get a jQuery WYSIWYG editor working in a pre-built perl script. I can't find where the text-area code is built, but I've found the name of the field I want to edit (and the place where the common header stuff is printed). Here is what I have: <link rel="stylesheet" type="text/css" href="/cleditor/jquery.cleditor.css" /> <script type="text/javascript" src="/jquery.1.4.4.js"></script> <script type="text/javascript" src="/cleditor/jquery.cleditor.min.js"></script> <script
upgrading existing jquery
hoping someone will just know this, rather than having to adopt a suck it and see approach... I am doing some development on a site that is using "jQuery 1.2.6 - New Wave Javascript" The question is - will just swapping out to 1.5.1 (and 1.8.11) be likely to break anything..? pleesayno. there are all kinds of bits of libraries referenced all over, so I accept that something may break, but I don't know if anything drastic in the way documentbyid or anything was handled (I recall doing it differently
progress bar in jqgrid?
hi All, i am very pleased if someone help me about that whether i am able to show a progress bar in jqgrid (the values are whatever). thanks for your time. warm regards, khalid
Is Parallax with a slight tilt or rotation around the base layer possible?
Hi everyone, I'm new to jQuery and would like to create an image that utilizes Parallax, but would also like there to be a slight tilt or rotation around the base layer. The effect would be similar to a camera dolly that was fixed on a single point. Any suggestions to accomplish this would be appreciated. If it's not possible then I'll go the embedded movie route. I'd just like it to be more interactive. Thanks.
Slider Issue
Hello Experts ! I am a novice in understanding the working of Jquery plugins.But in my website I have extensively used Jquery plugins. I request the learned members present on this forum to help me resolve a issue which has been troubling me from a long time..On my home page (http://cricketwar.com/?hidAction=home) the top drop menu i dont see the blue slider line on mouse travel..but on certain internal pages like these (http://cricketwar.com/?hidAction=pros1 ) i see the blue slider line on mouse
Jquery proxy.invoke
I have been using west wing's ww.jquery.js proxies to make calls to our .asmx. So far the basic premise works: var parameters = new Object; parameters.hi = "Hello"; proxy.invoke("getHello", parameters, function(searchResults) {...blah blah The asmx call: [ScriptMethod(ResponseFormat = ResponseFormat.Json)] [WebMethod(EnableSession = true)] public string getHello(string hi) { return "hello";.... This works just fine..however, I don't want to pass a paramter
animate not working in safari
I'm using Fancy Form Slider and love it. In firefox, it's working great. In Safari, its not so hot. Check it out: http://beta.crambu.com/clients/createPromotion.php It renders fine in both, but the animation is acting REALLY weird in safari. I've used alerts to see if its using the correct data, and it is. Both the "current" and the new marginLeft are properly being set (in fact, it IS being set in safari, because when i inspect the element, it has the right margin-left data thats being alerted.
what is this error pls
this is my own, IDE underlines dot before "is" in read, meaning it's an error.. what is the error... if ( $('.fakeRadioButton' this).is('.fakeSelected')) { $(this).addClass('bg_white'); } compare w/this, from jQuery site, if ($(event.target).is('li') ) { $(event.target).css('background-color', 'red'); } thank you.. (PS: there's something wrong w/editor in this window, once I make a font-change, I can't do it again to another paragr.. same thing happened yesterday... (I think code should
Upload an photo using $.ajax
Hi, I have a registration form in which I would like the user to have a preview of the photo he selected to upload. I know that I have to upload the photo to the server in order to display it to the user (security reasons - can't access the full photo path from JS). I would like to upload the photo to the server using the $.ajax method without any plugins involved - is it possible? If it's possible, please supply a link :) I searched on google and couldn't find any code examples... Thanks in advance
Handling paste event on mouse click...??
Hi, I need to call a function when user copy and paste the text value in the text box. I tried using "mousedown" event. But "mousedown" event handles left and right clicks when user clicks on the paste link on right click unable to handle the event. I am using jquery 1.5 . Please help me solving this issue. Thanks in Advance, Deemanth
wink-like effect not working with animate()
Hi guys :) I've created the following rollover effect but it doesn't work as expected : $(document).ready(function(){ $('#area-row-2-sub-left a').bind({ mouseover: function() { var tHeight = $(this).height(); $(this).find('u').animate({height: '0'}, 400, function() { $(this).find('u').animate({height: tHeight}, 400, function() { }); }); }, mouseout: function() { } });
Selecting one item and manipulating muliple items.
Ok, I am missing something here but this is what I want to do. I want to select a checkbox as such $('chkRequired'); Easy enough. But I want to then use $(this).attr('checked','true'); and then $(this).show(); and then $(this).next().show(); How can I formulate that into something like: $('chkRequired') ???? { $(this).attr('checked','true'); $(this).show(); $(this).next().show(); }; Thanks, Cory
Append link title attribute to link body
I'm trying to append the title attribute to the text of my link. I've got it working, except for the fact that all three links are showing the first link's attribute. Check out the demo at http://outdoor/fuelmultimedia.ca Hover over the Products menu item, and you'll see the drop-down with the attributes. This is the code I'm currently using: var $titleText = $("#top nav ul ul li a").attr("title"); $("#top nav ul ul li a").append("<em>" + $titleText + "</em>");
Animate scrollLeft get problems in IE and FF
I´m trying animate horizontal scroll. I use this code: <script type="text/javascript" src="jquery-1.5.2.min.js" ></script> <script type="text/javascript"> $(document).ready(function() { var margin = 0; var width = $('body').width(); $('#next').click(function() { margin +=width; $('html, body').stop().animate({scrollLeft:"+="+500},1000); $("#prev a").css('visibility','visible'); }); $('#prev').click(function() { margin -=width; $('html, body').stop().animate({scrollLeft:"-="+500},1000);
Poll server for file date?
Hi. I have a page that serves up data that is refreshed every 30 minutes. I'd like to do the following: Data last updated April 15, 2011 at 4:36 PM (16 minutes ago). I'd like to refresh the date automatically without the user hitting Refresh. Two questions. One: How do I poll the server every 30 seconds and check a file date? Two: How do I do the "16 minutes ago" part? Thanks for any help.
Migration from jQuery 1.2.6 to 1.5.x
Hi guys, Our code still uses jQuery 1.2.6 but we'd like to upgrade to 1.5.x => is there any guideline, how-to, documentation about migrating from an older version to the current one? We are hoping to see things like: What to look for How to change certain constructs that don't work anymore etc. Thanks, MM
SlideToggle
Hi!, How do i check if the state of the object that i have used the SlideToggle i need to add different calculations depending on if the object is visible or not. like if (div = visible) do something slidetoggle the div else do something else slidetoggle the div any sugguestions?
jQuery Numeric Stepper and Shopping Cart Problems
Hi Guys, I’m using woo cart from CodeCanyon to build a micro site that sells just one product this works great but when the product gets added to the cart theres no numeric stepper so i implemented one and that works also to increment the value in the input field. BUT even though the numeric stepper makes the quantity input field increase the actual product quantity and price don’t increase with it. How i can stitch the two together so that if i click the plus on the numeric stepper the price goes
How do I enumerate properties of jquery objects?
I have a menu that is made from a ul element (with li children). Here is an example: <ul id="menu" > <li><a href="#divEntire2">Home Page</a></li> <li><a href="#divAboutUs">About Us</a></li> <li><a href="#divLogin">Log in</a></li> </ul> I use CSS to make the ul elements look like a menu. This behaves OK when you click on the words, but nothing happens when you click on the background under the words. (there is a background image that repeats that creates the illusion of a bar under the menu with
submit and email two separate forms from one onclick event
I have a web page with two forms. I would like to click on a button and email both forms, one after the other to two different email addresses. I am new to jquery and I can't figure out the syntax but my attempt is below. I can do this with javascript but it only works in IE and FireFox but not in Chrome. <html> <head> <script type="text/javascript" src="jquery.js"></script> $('#target1').submit(function() { alert('Handler for .submit() called.'); return false; $('#target2').submit() });
Replacing a set piece of html with another
Hi guys, wondering if anyone can help? I am wanting to select a set piece of html and and replace it with another piece of html. I've used the replaceWith command but I don't think I've written the script correctly to select the piece of html as it breaks the script. thanks guys
vertical sliding navigation - how to improve my code?
hi folks! i have been coding on this vertical sliding navigation quite a while. its tested on all relevant browsers and works like a dream. id loved to show you an example of it, but the site is under development, and i, as a little coder, am not allowed to grant access to it, additionally i do not have enough time to create a testcase for everybody to see. to give you a short insight: the site is quite long (vertically) and we wanted a small navigation (very subtle) to follow the user when scrolling.
A better easing equation for bouncing?
Hi everyone :) I'm using jquery.easing.1.3.js and I'm not too happy with the behavior of easeOutBounce because the bouncing is proportional to the distance which cause a very hard bouncing when the distance is important. Do you guys know where I could find an equation that always bounces gently? Thanks a lot! :)
Print This Page - with preview dialog
Hello, anyone knows how to do a print script? The thing is that I need to first open a popup page (like a 'preview the page') from where you are when you click at a print this page link) and then automatic open windows.print? Again: every page at a site will have this 'print page' link, this link lives in some code in a template, so the link is not written multiple in every page around the site, so I need the popup to be dynamic and display the current page.. Tnx in advance!
Using anchors to link to page and auto-open lightbox (using PrettyPhoto)
Hey guys, I'm new to the site as well as to jQuery so please go easy on me. I've figured out jCarousel (somewhat) as well as how to implement the PrettyPhoto lightbox function but now have a core functionality challenge on my site. I want to be able to click a link on my ABOUT page that will take the user to my VIDEOS page and then immediately auto-open a particular lightbox (using PrettyPhoto) that corresponds to a thumbnail on the VIDEOS page. Does that make sense? The reason for this is I want
Next Page