Jquery update meta tag?
Hello, i heve some problem. I need update my meta tag ="description". My website he is changing div [ajax] and i need change meta tag for info, home, contact, offers itp. but this code doesn't working : $('meta[name=description]').attr('description', new tags blablalba);
Align 2 Elements
Hello, I have the following HTML: <a href="#">Link</a> <div>Some Text</div>How can I align div with A tag on the following positions: top center, bottom center, right middle and left middle? Thank You, Miguel
JQuery Plugin with 2 Selectors
Hello, I created a JQuery tooltip plugin which can be used in two ways: The tooltip content is the title of the HTML anchor; The tooltip content is passed as an option;I would like to have another option: The entire tooltip markup would be an element in the page. Let me give an example of what I am looking for: $("table td.Task a.Menu", "li div.Menu").Tooltip(); So every link Menu under "table td.Task" would fire a tooltip. The tooltip markup would be the div.Menu
Enable a radio button by selecting another radio button?
I have these three sets of radio buttons: <div class="radio"> <input class="radio gateway" type="radio" id="gateway1" name="radio" value="Gateway: YES" /><label for="gateway1">Yes</label> <input class="radio gateway" type="radio" id="gateway2" name="radio" value="Gateway: NO" /><label for="gateway2">No</label> </div> <div class="radio Gatewayadd">
Catching error when .css fails
Is it possible to set up an error handler that is called when a .css fails due to, say, a non-existent URL? E.g. $("#blahblah").css("background-image","url(thisiswrong.png)"); I've tried this but haven't gotten it to work. http://jsfiddle.net/ajb568/xWmn4/2/ Thanks.
[jQuery] Problems w. IE7
Im trying to use the minimized version on a site im developing. It works like a charm in FF/Chrom/IE8+ but when i try to run it in IE7 it gives me: Error: Invalid argument. If i run the debugger it breaks on if((!r||-1===b.inArray(o,r))&&a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)) With the message: htmlfile: Invalid argument. Does this make sense to anyone? Anyone have an idea if how to fix it? Regards -- urnmog
How to access data-code attribute and redirect to some address on click
Hi, I've this HTML code: <ul role="menu" class="dropdown-menu language"> <li><a title="English" data-code="en" class="link" href="#"><img title="English" alt="English" src="image/flags/gb.png"> English</a></li> <li><a title="Español" data-code="es" class="link" href="#"><img title="Español" alt="Español" src="image/flags/es.png"> Español</a></li> </ul> And then I wrote this code: $('.language > li').click(function(){ alert($('.link').attr('data-code')); }); When I click in first LI all
addClass to element based on drop down menu select
Hello, I think I'm missing basic terminology again. I have addClass/removeClass code working for child elements when a radio button or check box is clicked. What I haven't figured out yet, is to addClass to a child element when a particular drop down menu value is selected. so in the code below, if "1" is selected then I want to addClass required to phone1, otherwise no class is added to phone1 <select name="date3" id="date3" tabindex="13"> <option value="1">1</option> <option value="2">2</option>
Loop through only five times on XML Success
I have my code written that returns a list of all the items from my XML list. I want to just show the most recent five items based on the <pubDate> which looks like this: <pubDate>Mon, 08 Apr 2013 15:21:26 GMT</pubDate> The code that I have that works is this but I don't know how to read the pubDate and only show the 5 most recent items. <script type="text/javascript"> $(document).ready(function(){ $.ajax({ type: "GET", url: "/feeds/rss/news-feed-2/",
Question: What would be the best solution to do this?
Basically, a customer views the page and is presented with a starting base price, they can then drag and drop extras onto the base product and it increases the price, I have thought of many ways to do this such as multiple html pages when a user selects a new product but that way is quite extensive and unnecessary when I could do it using jQuery. So my question is, is there a plugin that can provide this type of functionality? Or could someone quickly write me up some psuedo code? Thanks a lot for
How do I do stacking/shuffling effect for a webpage? Please help. Urgent! Can pay MONEY.
So, basically I want to imitate a deck of card effect for a website I'm creating. http://tinyurl.com/bqobc7s If you go to the above URL, basically I'm trying to create a similar effect but if you look at the design aspect below, I need to have the previous pages shown behind the current page and when you click on the text--- it should appear in front with the same effect.... I hope I explained it correctly. Right now, on my current website (above link), you won't see the content behind "OUR SERVICES",
Dialog position restricted only to frame boundary
Hi Friends, I have frames on my home page, when I open a dialog from my body frame the dialog position is restricted only to the frame border, ie I am not able to position out of boundary of body frame. Please help.
Documentation Update
Please vote to include in documentation in all functions the return value Just a small line: function ... bla bla returns : jQuery object, or previous values There is no reason for manu functions like width when setting a value actual = $(target).width(500); the same for many other functions Or is somewhere any information about the return values? Thanks
Reading XML issue
Hi, I am facing problem while reading following XML data: XML DATA (saved in test.xml): <sites> <site id="0"> <url loc="http://www.abc.com" /> //Error <title>ABC</title> <desc> <brief>this is the brief description.</brief> <long>...and this is the long description. See how long it is :)</long> </desc> </site> </sites> JQuery CODE: $.ajax({ type: "GET", url: "test.xml", dataType: "xml", success: function(xml) {
jquery dialog with dynamic data
Hello, First I want to thank everyone who has helped me in previous posts (kbwood and jakecigar to name a few). I'm not sure if my question is more php than jquery but it can't hurt to ask. I"ve had success calling a jquery dialog with a hyperlink using href="#". Where I"m running into problems, is linking to multiple dialogs on one page. I'm hoping to call the dialog with an href="#{contentVariable}" I"m using ExpressionEngine CMS, so once in the dialog I can call the correct data. I"m just
Automating JQuery content switcher
Guys I'm trying to automate the JQuery content switcher on this fiddle URL but it doesn't seem to be working. I'm trying to get it to start rotating every 6 seconds on it's own but to no avail. The code looks as shown below $.fn.slideFadeToggle = function(speed, easing, callback) { return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback); }; var max = $('div.faces').size(); $("div.faces:not(:first)").hide(); $("ul.intro-nav li:first").addClass("currFace");
JQuery recalculate css on window resize
On this site: http://houston.aiga.org/ Although the slider is full width / variable on browser window size, the Title of each slider item is always indented to line up with the content. I've tried setting this up: http://jsfiddle.net/topiman/xS7vn/5/ $(window).resize(function() { $('#item').css("padding-left",$(window).width()/2); }); The function is working but the calculation pushes the item too far in on decreasing window size and too far out on increase. The line in the working slider example
$.ajax success and error
Hi. I'm relatively new to jquery. I was trying to do the authentication using JSON API's and if its a success it should start holding the session. If the JSON api doesn't retrieve any results, it should pop an alert showing "Not a User Here is the script. I'm not sure what is missing. Its able to display "success loop" message but not the error alert $.ajax ({ type: 'GET', url: link, dataType: "jsonp", success: function (data) {
removeClass ---- addClass --- when onClick in effect
I have a web page that has a UL and LI and on the LI entries I have the class='memList' - I also have a jquery method $(".memList").ondblclick..... when the web page is first displayed things work perfectly.... Now, there I also have some code, which also works, that will perform a removeClass("memList") and then addClass("memListSelected") so the user can no longer double click on the item... I can see the HTML getting modified in FireBug - so changing the class name works also... Problem,
possibility in jquery to create a graph and draw line on the graph when a user select a point in any quadrant Q1, Q2, Q3, Q4
Hi Everyone, I have a requirement to create a plane graph with X,Y ranges and need to draw lines on it. When a user clicks on (2,4) and (4,8) it should draw a line between these points. Please suggest how can I achieve this. Thanks & Regards, PJ.
Parallax jQuery scrolling speed.
Hello all; I've started tinkering around with Parallax scrolling sites, using jQuery to power the animation, and I'm having trouble finding exactly where I can alter the speed of the scrolling. Has anyone got any tips/used this before? The template I'm using is here: http://webdesign.tutsplus.com/tutorials/complete-websites/create-a-parallax-scrolling-website-using-stellar-js/ Any help would be hugely appreciated.
Trigger click not woking in safari
this is my jquery script <script type="text/javascript"> var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>); jQuery("#amconf-images-150").css("display",""); function select_dd_watts(div_id) { var volage_btn = div_id; div_id = div_id.split("-"); var attr_id = div_id[1]; jQuery(".watts-text").css("color","#fff"); jQuery(".watt-class").css("color","#fff"); jQuery(".watts-div").css("background","#000");
how to get the current reference in jQuery
means that $ and jQuery are two basic reference in jquery. some change the reference $jq=jQuery.noConflict(); and other one can change the $jqLib=jQuery.noConflict(); please tell me how to get the current reference in jquery. which function give the what is the current reference in jquery.
How to do $.getJSON when datepicker changes value?
Hi I am trying to send a ajax request to set cookies and once the cookies are set then reload the page. I need this request to be automatically sent as soon as the user select a date from the datepicker. I have tried the following code but it does not work. thanks for your help :) <script> $(function() { $( '#scheduledOn' ).datepicker({ showOn: "button", buttonImage: "images/calendar.gif", buttonImageOnly: true, changeMonth: true, changeYear: true, onSelect: function() { $.getJSON("ajax/cookies_handler.php",
Selector Question
Hello All, I am wondering if someone could explain to me what is going on in this code: var xmlDocPath='business_courses.xml'; $.get(xmlDocPath,function(data){ $('course',data).each(function(){ // Code to be executed } } Specifically I am not understanding the selector $('course',data). What is it selecting? I do not see this form of the jQuery selector anywhere online. Is it selecting all of the "course 'elements in the XML document? If so why is it that I cannot display
Jquery Tree menu with different context menu item
I have created Tree View with context menu in following structure CCA CCA2007 NIC2007 NICSubCA 2007 TCS2007 TCSSubCA 2007 CCA20011 NIC2011 NICSubCA 2011 TCS2011 TCSSubCA2001 This is my tree structure.For the above tree view menu i need create context menu with different menu item. for example if user right click on CCA2007 or CCA20011 Context menu should be displayed
Help fading element in on scroll down and fade it out when scroll up has reached scrollTop
I am trying to fade an element, #topNav, in when the scroll-bar goes down and then fade it out when the scroll-bar goes up and reaches the scrollTop. With this code, it fades in on scrollDown and when it hits the top. $(document).ready(function(){ function scrollFunc(e) { if ( typeof scrollFunc.x == 'undefined' ) { scrollFunc.x=window.pageXOffset; scrollFunc.y=window.pageYOffset; } var diffX=scrollFunc.x-window.pageXOffset; var diffY=scrollFunc.y-window.pageYOffset; if(diffX<0){
When and how are ajax calls cleaned up after they are completed?
Hi, I noticed that if I pass a context object to the $.ajax function, that object will never be released, even after the ajax call has completed. For example, in the following code, object 'a' is never destroyed because the 'callbackcontext' object kept a reference to it. The same applies to the callback functions passed to the ajax call as well. I used Chrome's heap snapshot tool to check the existence of objects. It seems unnecessary to keep those callback functions and callbackcontext objects
Active state disables link action.
Hi all, I have a function that sorts property listings, however when I add my active states through jQuery I loose the functionality (the page doesn't change or do anything). I assume I have to have a change var url function but Im not sure how to apply this to my code. I have included my php and jQuery below. I truly appreciate any help. Thanks in advance! <?php foreach( array('desc'=>$main_floor_master) as $asc_desc => $asc_desc_name ) { echo '<a class="filter-checkboxes"
File uploader - multiple instances issues
Hi there, I've been trying to implement a few file uploader packages in a dynamically loaded format, with a potentially unknown number of them on a page. I'm currently working with this one: http://nghiadh.info/blog/html5-drag-and-drop-and-xhr-upload-34.html I have tried tricks I've read about like using ^= in getelementbyid and also "\\S*" to ensure that the relevant div id is used by the javascript but I've had no success. I've also tried adding a class name to each div and using the getelementbyclass
Microsoft JScript runtime error: 'jQuery' is undefined
Hi, Please find below code. My this code is giving error "Microsoft JScript runtime error: 'jQuery' is undefined" when I am debugging in Visual Studio. <script src="Scripts/jquery-1.9.1.min.js" type="text/javascript"></script> <script type="text/javascript"> jQuery(function ($) { // simple jQuery validation script $('#login').submit(function () { var valid = true; var errormsg = 'This field is required!'; var errorcn
ToggleClass?
Hey All!! I just started using jquery, and i have the following question. I've got the following HTML: <div class='payment_options closed'> <input id='payment1' name="payment_type" value="1" type="radio" /> </div> <div class='payment_options closed'> <input id='payment2' name="payment_type" value="1" type="radio" /> </div> <div class='payment_options closed'> <input id='payment3' name="payment_type" value="1" type="radio" /> </div> Now, i would like to, if the input is Selected,
checking whether any asp:textbox has some text or any checkbox,radio,or dropdown selected index>0 in a div
I want a jquery function that will find whether any text box has some text or any checkbox is selected ,or radiobutton, or dropdown has seleted index >0 in a div..the fact I want any thing is selected any input type or asp type in div that shd return 1(true) else false
Chrome Problems
Working on the basics here. Page load works fine in Safari and fine on Iphone simulator (also Safari), but all asynchronous links fail in Chrome. I am loading them locally, not sure if this matters. Click the link for the About page and you get a page load error. I saw something similar with nested lists earlier. Thoughts? Simple test page: HOME: <!DOCTYPE html> <html> <head> <title>Page Loading</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0,
Ajax Same orgin policy
I am using AJAX to pass a variable to a aspx file on another domain on the same pc. In my test environment this works great. On my production machine it doesn't nothing happens. I don't have anyerror trapping in the AJAX statement. This is a custom webpage speaking to homeseer homeautomation software, so if it all worked a light would come on or off. The both websites are on different port numbers I believe that this is an issue with same orgin policy. My developement machine is win7 xampp(for
jQuery 1.9.1 | DnD and img load for FileReader / Canvas?
Is there a way to combine both HTML5 native Drag & Drop and image file append (local) for FileReader / Canvas manipulation? Basically I want to either: Drag (native drag & drop) an image thumbnail (PNG Base64) located in a source div and drop it in a destination div where upon the dropevent FileReader and Canvas do their stuff, or: Append the same image thumbnail located in the same source div into the same destination div where upon an append or load event FileReader and Canvas do the same stuff.
problem with ubind and hover
Hi all, i have just updated my jquery version from 1.8.3.js to current. the code below used to work on last version but not on current. Is it normal ? :s <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> </head> <body> <div id="dv1" style="float:left;width:50px;height:50px;background-color:blue;"></div> <div id="dv2" style="float:left;width:50px;height:50px;background-color:orange;"></div> <div id="dv3" style="float:left;background-color:grey;height:50px;width:50px">
How To Initiate a Function inside another Function
I'm new to JQuery, but I feel I can grasp it pretty quick with the help of a few boosters. I'm using this script that creates a dialog box on my site for my form field. Now I want to load some value into the form after the form loads in the dialog box. I feel that I have the correct code to do so, but I'm having issues kicking off the function. With the part highlighted in bold, Firefox reads that "readyFields" is indeed a function but for some reason it doesn't initiate. Any suggestions? jQuery(function
Target Rollover Image with jQuery Fade Script
I'm trying to get the fade effect with the rollover images but I can't seem to get the script to target it. http://jsbin.com/oxahed/1/edit I'd like the words to have this effect: http://jqueryfordesigners.com/demo/fade-method1.html Any help would be amazing! Warm regards, Dar
How to save counter time when jumping between tabs?
Hi I am using the runner plugin http://plugins.jquery.com/runner/ It is working perfectly. However, I have it to auto start counting as soon as the user load the page. However, the problem that I am having is that I have 4 tabs in my main page and I want to keep the timer running even if i switch the tabs. I am assuming that I would have to store the value of timer in cookies some how and set the times to start counting from the cookies time. but how can I store a value in cookies? and keep the
Next Page