animate function is not working in jquery-1.2.6.min.js version
Hi, I have a problem, I am using Jquery 1.2.6 version with existing website. I want to animate something on mouse over and for it I used animate function for it but I not able to get expected result. Please help me out int it. $(document).ready(function() { $(".small-packagebuilder").css({"background-position": "5px 0"}); $(".builder_top_magenta span a").hover(function() {
3 columns equalheight, font-resize -> scrollbar :(
Hi there, i have a problem and i can't solve it. I have a blog with 3 columns. I wanted equal height for the columns, so i copied this code to the html: $(document).ready(function() { $(".main_content").equalHeights(100,"auto"); }); It's working, which you can see here: www.tejbepapi.hu (it's a hungarian wordpress blog with my self-made theme). I inserted two font-resizer button (+, -) to the page, and if you push the + button, a scroll bar appears on the page. This is ugly and not practical. My
Combining Jquery Cycle and Lightbox
Hi, I've been trying to combine these two functions, with no luck . Cycle works perfect on its own So does Lightbox. Here's the of my page : <!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</title> <link href="css/lucas.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css"
How do I maximize a div to fill the entire screen?
I was trying to modify the code-slider plugin so that it would scroll panels that were the size of the entire screen. (the demo on the jquery site has it moving panels that are rather small). So I thought all I had to do was take each div that sandwiches the panel (several are nested) and set their width in code to be the width of the monitor. It did not work. So I simplified the code to show here. I just have the divs, and their css, and the code that sets them to the width of the screen. If
jquery and bb tags
im trying to make a small jquery bbeditor and have hit a road block. when the user selects the [b] tag for example i want it to wrap the tags [b][/b] around their highlighted text. if they havent highlighted any text then it will insert the tags as normal but i need the caret to be in the middle of the tags. Any one know how i would go about this?
Find current link and apply CSS
I have list of links inside a DIV. I am trying to apply CSS to the current page link but it does not work. My code is as follows. var url = document.location.toString(); var chunks = url.split('/'); var newUrl = chunks.slice(0,chunks.length -2).join('/'); $('div.maacmenu-toplinks a[href*=newUrl]').addClass('activeClass');
Validation Error inside textbox....
How to make validation something like in this screen shot attached below..! is there any jquery plugin ,will do the validation...
:last-child with text elements
I'm trying to find the trailing <br/>s from a <p> using the 'br:last-child' selector and I find surprising that in a context like: <p>some text<br/>and some more text</p>$('p br:last-child') returns the <br/> although there is a text node after it. I suspect there may be an issue because if you get the returned <br/>: var br = $('p br:last-child')[0];and get its parent's last child walking the DOM properties: br.parentNode.lastChildyou get the text node containing "and some more text". So, should
Having trouble getting the most basic jQuery statement working ...
Hi all, I've got the following code block in one of my pages ... <?php if ($config->theme->short_name == 'default') { ?> <script type="text/javascript"> $('.error_box').html("Hmmm, there was an error while loading your theme. To stop everyone from looking silly I've loaded the default theme ... hope that's OK!"); </script> <?php } ?> The conditional is being evaluated fine because I'm able to use window.alert without
extends a date object itself
I tried to copy a date object but failed. var today = new Date(); var clonedToday = $.extend(true, {}, today); console.log('test1:' + today); console.log('test1:' + clonedToday); //clonedToday is [object Object]. but when I tried to copy an object contains a date object, it worked. I know there was a problem with copying date objects with extend with jQuery 1.3 or lower but it fixed in jQuery 1.4 or higher. the following code works fine with jQuery 1.4 or higher. var today2 = { today: new Date()
Sliding Page
<script type="text/javascript"> $(document).ready(function(){ $("#page").load('lang/eng.txt'); $("#page").slideUp("1"); $("#page").slideDown("slow"); $("#eng").fadeTo("normal", 0.25); //swedish $("#swe").click(function(){ $("#page").load('lang/swe.txt'); $("#page").slideUp("normal"); $("#page").slideDown("slow"); $("#swe").fadeTo("slow", 0.25);
jQuery cycle + if/else show/hide div
I'm using the jQuery cycle plugin...what I'd like to do is check if an image contained within div#slideshow has a class of "before"...if said image does have that class, I'd like to show a div with a class of before, if not, then hide the div.before make sense? In the example, image-1 would show the div.before, image-2 would hide it. Any thoughts? <div class="before"></div> <div id="slideshow"> <img class="before" src="image-1.jpg"> <img src="image-2.jpg"> </div> <script type="text/javascript"
Controlling html5 video without self referencing
This works: $(function(){ $('#video').click(function() { this.play(); }); }); but this doesnt: $(function(){ $('#video').click(function() { $('#video').play(); }); }); nor does assigning a var to #video or any other trick. Im trying to get the video to play when another element is clicked so i cant use 'this' selector.
problem with selecting parent element
Hi all, I am doing a form with hidden fields which will be fired by select boxs or radio buttons, all the hidden fields are wrapped by <span> the problem is when the hidden field is next to select box like this: EXAMPLE1 <label>Title: </label> <select name="title" id="titleSelect"> <option value="">Please select a title</option> <option value="Mr">Mr</option> <option value="Mrs">Mrs</option> <option value="Ms">Ms</option> </select> <br/> <span><br/> <label>Please
:contains variable
Hey guys, i'm having a problem with this: for(y=0; y<numbers_sold.length; y++){ $("#stickers a:contains('" + numbers_sold[y] + "')").addClass('sold'); } If I substitute the variable "numbers_sold" for a number, it works. But it seems that this way it doesn't recognize the variable. Hope you can help. Thanks.
how to each and split using ?
the following code, how can devote the array values? var arrValues = ["a:1", "b:2", "c:3"]; $.each(arrValues, function (name, ID) { OpenPopup(name,ID); });
Question about concurrent ajax requests, keeping track of which one is completing
I have a question for the jQuery gurus. I am working on a page with several checkboxes. As the users click checkboxes I want to show a loading indicator next to each one, then when the request completes I will replace the loading indicator with some data that was returned in the ajax request. I'm having trouble figuring out which loading indicator to replace when the ajax request completes. I think it will work if I pass in the loading indicator's parent element ID to the ajax request, then on the
$.ajax({ selector?
$.ajax({ url: "test.php", dataType: "html", success: function(data, textStatus){ $("#top").empty().append(data); ... ok now my question is a bit lame but how by this get my spec. content from test.php eg. #footer i can load it via $('#top').load("test.php #footer"); but how to make it using this $.ajax function?
help with linking datepicker to progressbar widgets
I need to create a simple progress estimator based on start date end date and the current date. So you would pick a start date then the end date and then the current date you are on, and it would be calculated to a percentage on the progressbar. I've got it all looking good but I don't know how to get the datepickers to output values the progressbar can read. Any help is greatly appreciated :D
form validation with jquery but not on hidden elements
I have two tables: the first is shown and the second is hidden. If the last two items (in color) in the first table have either "Yes" choices selected, then the second table appears. I'm having trouble getting the form to submit when the second table is hidden. If the second table is hidden, I don't care whether the radio buttons are selected or not. I've been messing around with the jQuery Validation Plugin at jquery.bassistance.de/validate/demo/milk , but I can't seem to get it to work. My page
Disable mouse scroll wheel function
How to use jquery to disable mouse scroll wheel function that scrolling the long page when the mouse is pointing inside a div? I need to disable it because I have another mouse scroll wheel function inside the div, if the page is too long, when i scroll my mouse wheel, the div and the page both will be scrolled. I don't want both of them be scrolled, i want inside div be scrolled only.
IE9 RC problem with JQUI dialog
This is a very strange problem. I have a page with: -- a div containing a link -- another link that, when clicked, creates a new dialog window who's content is pulled from the div The problem is that in IE9 the dialog can be created and closed, and then never opened again. What's really happening is that the whole page seems to freeze (not the browser, just the screen). I don't mean it crashes, I mean it just doesn't draw any new changes (like the dialog being opened a 2nd time). After you click
How to get the actual size of an img
I have created a grid of images and want them to scale up, similar to google images. I'd like to be able to get at the actual size of an image, rather than the current size. Is there a JQuery function that does this? It seems the width() method only retrieves the current size.
Problem with jquery load()
Hello everyone, I'm using this script <script type="text/javascript"> function loadContent(elementSelector, sourceUrl) { $(""+elementSelector+"").load(sourceUrl); } </script> load the page inside the div <a href="javascript:loadContent('#content','prova1.html');">Sito</a>the script works perfectly, I just do not charge the various scripts of the page (site.php). How can I solve my problem? Thanks so much. PS Sorry for my English
trigger alert if button clicked and conditions not met
Can't get this to work correctly. I need to run an alert if the user clicks the button "#step0Next" and none of the var ckd button's are checked $("#step0Next").click(function(event) { var ckd = ['AMX1N','BMFNP','BMFNB','CFE1N','CBEXR','CBT1','CBTQL','CME1','CMEQL','CMX1','DCMX1','DMERT','DMEDL','ERX1N','ERXXN','EXC1N','EXD1N','EXR1N','EXI1N','IPE1','KCB1','LME1','DLME1','MPL1','NDQ1N','NDQL2','CEC1','ICEFI','NYM1','DNYM1','NYMQL','NYS1N','NYSLM','PNK1P','PNK2N','SMX1','CNC1N','CNS1N','MTL1N','MTL2N','MTN1N','MTN2N','WEA1'];
Mouseover/out play/pause
Hey everybody, This is my first post and I'm currently working 2 days with Jquery so i'm very noob at it I use this script to display and external rss feed into a news ticker (which works just fine). but, My question is... Can I make a function so the newsticker pauses when you mouseover it and plays along when you mouseout? I know these functions exists and there is a lot of documentation about it but i just can't seem to get it working in my script. Can someone provide me a working code please,
console.log() ?
Hi guys is console.log() a javascript of Jquery? By the way I want to understand console and log() Where I can find the manual for this? Can you show me the link. Thanks in advanced.
Animated (blurry text) text-shadow problem!
I'm trying to slowly blur text but I'm running into a problem where color:transparent text is applied before text-shadow. I need it to apply at the same time. If it isn't apparent by the example, I'm using text-shadow to blur the text out to be unreadable, I'm not trying to add a simple text shadow. I need this to a slow animation. If there's a better way to do it, please let me know. I realize you can select the text and continue reading, but I'm not trying to block access to the text, I just need
Moving svg nodes
I currently create a grid of svg circles made up of rows. I can animate a circle from one row moving into another row, sorted by some attribute value. But when I use a selector to fetch all circles within a row I get them ordered by when they were added to the underlying DOM. Is there a way, if I created a group for each row, that when I move a circle from one row and insert it into another I actually remove the svg object from one group and insert in into the other so that it's correctly positioned
How to get the outer xml from an jquery root object?
Hi there, i pumped an xml string into jquery and want to print out the entire xml document. Something like this: var jxml = $("<servers><server>A</server><server>B</server></servers>"); Now i do some modifications on the dom or not... doesent matter. And then i simply want to print out the entire jxml content but i have no idea how to do this? Something like this: // Just simply alert out the outer xml content alert($(jxml).outerXML()); I tested the $(jxml).text(), $(jxml).html() and i got always
Need help with onbeforeunload function
Hi, I have the following code which acts as desired to a point. <script type="text/javascript"> window.onbeforeunload = function() { return "Using the browsers back, refresh or close button will cause you to lose all form data. Please use the Next and Back buttons on the form"; } </script> I need this to allow the submit button to submit w/o popping the confirm dialog. How would I add a var ie var okToSubmit and apply it to the function as if(!okToSubmit) return and set it to true on the submit
How can I get my script to run after all .load() events?
I have a simple script I developed, with help from a tutorial on jqueryfordesigners.com, which changes the class on a floating sidebar element in order to change it's positioning code depending on how far the document has scrolled. An example of it in practice is below. The sidebar stays within the window but will be bumped up when you scroll all the way to the footer: Structure Test 2b However, this solution depends on being able to calculate the height of the parent element of the sidebar, in the
Problem with function repeating itself...
Hello, I've got a problem with a function. The Script and Demo can be seen here (To call the alert click on the element with the content "T2"). It's a little sample of my new project I'm working on. The thing is the more often the function is called the more often I get alert with old content. For example if I've called the function for the second time I get two alerts. The first one with the content of the first execution and second alert with the content. Where is the problem in this function?
jQuery.get() and jQuery.getJSON() callback fails
I've been attempting to use 1.4.1 but I'm finding that $.get() and .getJSON() callbacks fail. The XHR requests succeed. I can examine the full request in both Chrome and Firebug. However, the callback functions *don't* execute. To test, I tried the same url with both 1.4.1, 1.3.2, and via a raw XMLHttpRequest(). The last 2 requests succeed, 1.4.1 fails. //v1.3.2 WORKS, fails in v1.4.1 $.get('/topic/api/template/list', function(data){ alert(data); }); //native WORKS var req = new XMLHttpRequest();
Events not fire after loading usercontrols dynamically in asp.net with c#
I am loading UserControl Dynamically in aspx page by using jquery.But I am facing problem while firing a click event of button (as well as dropdownlist) within the UserControl. It does not get fire. I want to write insert/upadate code, in ascx.cs file (on button click event). Please find below herewith my aspx, aspx.cs, ascx and ascx.cs file code. -- Default.aspx -- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD
I got a question with Jquery .load() function
I have a index.jsp and in this jsp i have a function for example: $("#test").load('loadtag.jsp?tags='+tagarray); what i want to do is that: in the loadtags.jsp page, i would like to do something and then refresh the loadtags page only what can i do?
a little JSON content validation in globalEval
The SHOUTcast 2.0 API has an issue where sometimes requests for JSON come back as XML. By adding a couple lines of code to jQuery 1.5.1 I was able to properly deal with this by throwing an error instead of having a runtime error. I thought this may be useful for someone experiencing similar weirdness. Line 54 in jquery-1.5.1.js: // JSON RegExp rvalidfirstchar = /^(\[|{)+/, ... Around line 588 in jquery-1.5.1.js: // Evaluates a script in a global context globalEval: function( data ) { if ( data
jQuery DOM issue - very frustrated!
Hi there Sometimes when I attempt to click on a link to a page all that the page returns is a JSON string and not the HTML of the page itself (In IE, FF and Chrome). the apache logs show a normal "200" page response. Why would a page just display the JSON string and not the entire page (with the JSON information placed in the DOM.. using.html..?) I would really appreciate some advice, as Firebug shows no issues as far as I can see, but the browser just displays the pure JSON string! Thanks!
ajax/php
this example http://www.bitrepository.com/a-simple-ajax-contact-form-with-php-validation.html is not working in my local php environment.. I don't see 'success' msg... I don't have php env online, so can't post a functioning example.. http://mayacove.com/ajax_jq/index.html php files: http://mayacove.com/ajax_jq/contact_php.txt http://mayacove.com/ajax_jq/functions.php http://mayacove.com/ajax_jq/config_php.txt it does connect to contact.php, b/c at bottom of contact.php I put "this is contact.php"
How do i minimize closure while using jQuery.bind?
Can someone tell me what the best practices with jQuery to minimize the effects of closures while doing event binding inside a self executing private function. I've been playing around and haven't found a satisfactory solution. Here is the sample code list below: The gist is i have a self executing function in private scope and in it i declare vars. eventually i may have another function scope and inside that i start doing bindings on DOM elements. There is a good chance when I do these bindings
Next Page