[jQuery] Is there a jQuery way to sort span-elements?
Hello, Assume I have 3 span-elements: <div id="names"> <span id="s1">Fred</span> <span id="s2">Alan</span> <span id="s3">Sally</span> </div> Is there a jQuery way to sort them so I get this: <div id="names"> <span id="s2">Alan</span> <span id="s1">Fred</span> <span id="s3">Sally</span> </div> ?? -Audrey
PLEASE HELP!!!Jquery navigation menu
How to disable active state when the pointer or cursor is not in the buttons? Because in my code the mouseover stay even if the cursor is not in the button. Here is the link http://bharce.com/hostdime2/index.html Here is the code <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript">
[jQuery] Plug-in for elegant Horizontal Menu?
I stumbled over a very elegant way to select from a large item list on http://siemens-home.com/ ("Choose your country"). Could anybody direct me to a jquery plug-in? It would be great to replace my drop- down menus with a more appealing menu. Thank you!
[jQuery] jQuery selector for style attribute
Hi, I want to select the following image using jQuery selector to see if I could use the style attribute, <img id="ext-gen439" class="x-form-trigger x-form-arrow-trigger" style="overflow: auto; width: 356px; height: 100px;" src="images/ s.gif"/> but seems the selector img[style=overflow: auto; width: 356px; height: 100px;] does not work at all. What would be the correct selector for the style attribute? Thanks in advance, John
[jQuery] [Autocomplete] Input edit does not fire autocomplete.
Coded the following in a page : var ArrayVariable = New Array(); $(document).ready(function() { $("#inputbox").autocompleteArray(ArrayVariable, { delay: 10, minChars: 1, matchSubset: 1, onItemSelect: selectItem, onFindValue: findValue, autoFill: true, maxItemsToShow: 10 }); }); Filling the input box does not present the list of matching array elements. I believe the array has the wrong structure because it is not recognized in jQuery.fn.autocomplete. options.data is set to null because data.constructor
Please Help!! Internet Exlporer and Cycle plugin Woes
Hey Guys and Gals, I am trying to break into the freelance world and my site is not working in IE. It looks perfect in firefox and in Safari. Any help you could lend would be soo appreciated. www.imperativedesign.net Im using a require statement to load the header with all of the script and css links. Then the Jquery slider plugin and lightbox to display my portfolio images. The bottom div uses ajax to load my contact form into the index page onload. All the JS seems to be messed up in IE. Thank
[jQuery] Combining two jquery cycle plugins = HELP PLEASE
Hi Guys, This is my first post, I am really stuck with some simple JQuery. (I am a complete beginner) I am working on a site which requires the following effect... The user clicks on a link in a right hand sided #div and the images in the left #div shuffle and the relative info for each dress will fade into the #div on the right hand side. See this image for a clearer idea of what I mean - http://img254.imageshack.us/img254/8895/screencapture7.jpg I have tried the http://www.nabble.com/file/p25190841/index.htm
[jQuery] $.each cannot iterator my array
Hi, i have an array initialized like var myArr = new Array(); later I use myArray['somestring'] = new Array(); myArray['somestring'].push(mydata); to create and new array inside of it, and populate my data by pushing. Then I want to use the jQuery.each(...) to iterator over it, like this $.each(myArray, function(){ alert(this); }); But I found the jQuery does not event enter the loop. What's wrong with my array?
[jQuery] input color - default color
I have inputs with validationin in jquery. If data are wrong I make red background color in input: $('#first_input').css('background-color', 'red'); After click reset I would like to see default input color so I make: $('#first_input').css('background-color', 'white'); But inputs with background-cloror: white looks different than default inputs - why ?
help with plugin
This is probably something pretty basic, but I began making a plugin the other day just to get familiar with the process, and I've run into something that I'm not really sure how to fix. I started off with something simple, made a basic content slider plugin. Anyway, I can only get it to work on one object. For instance, for now, the html is a container, then within it, an unordered list, and its list items. If I make this twice, give the containers a class of 'slider' and then call the plugin using:
[jQuery] Reading text value on <button> element
I'm trying to read (and then change) the text on two buttons in my user interface: <button class="primary approve">Approve selected</button> <button class="primary reject">Reject selected</button> Now depending on how many checkboxes (elsewhere) are selected, I want to change the text to something like "Approve 4 selected" I'm tried in vain to acess: $("button.primary").each(function(){ console.log( $('this').text() );//fails console.log( $('this').html() );//fails }); and for completeness sake I
[jQuery] <span> onchange event - possible?
Hi, is it possible in jQuery to constantly observe <span>, and if content is changed - then trigger some action?? I have seen something similar in prototype (but not sure if it worked for span) Thanks Tomas
[jQuery] inline delete ajax function/confirm dialog
Hi all, I have an inline delete icon on a table of a query, when the delete button is clicked, i have a dialog popup to confirm the action i then issue an ajax call to delete the user from the database and then remove the tr from the table. it all works fine until the dialog is closed. either through the delete ajax function or the cancel function of the dialog. The dialog will then not open if any of the delete icons are clicked in the table until a page refresh. I hope someone can help as this
Declaring an empty array
Hi, I am a bit new to jquery. What I want to do is declare an empty array. so i do it like this: var changedValues = {}; Now i m populating this array dynamically with values, something like this changedValues[elemName] = elemValue; This also works fine. BUT, when i do a alert(changedValues.length) .... it gives "UNDEFINED" even though the array is not empty. Saw it through firebug .. Can anyone tell me wht is happening here? Or if any1 can provide a better method. Thanks for the help.
[jQuery] not able to append new tag in XML in IE
I am making an ajax call and in response, i am getting an XML. And then using data from XML, i am creating a form. I stored response XMl in a variable like this var xmlData = $(data); If there is any change in any field of form then i am changing corresponding node value in xmlData by appending new node in related node like this : var val = document.createElement('{nodename}'); $(val).text({changed value}); $({corresponding node}).append($(val)); This is working fine in FF but not working in IE.
[jQuery] [validate] - merge 2 sets of rules?
Hi, Is it possible to merge two sets of rules? I have one set generated server-side but for some strange reason 2 fields are skipped. so as a workaround, i want to merge the generated rules with 2 by hand rules. Thanks, Dan
[jQuery] Limit nextAll
Basically i'm going through a table, i've used closest to get the parent element which is a tr then i can use next() to get the next one or nextAll() to get all the next ones however i just want to get the next two elements so is there a way to limit nextAll() to only return the next two matches rather than all of them?
[jQuery] Plugin to let the user draw rectangles
Is there any plugin to let the user draw rectangles (probabbly with mouse clicks or key-arrows) and store the coordinates in a hidden variable ?
multiple coda bubbles
Hello, my goal is to have tooltips with the script 'coda' from here http://jqueryfordesigners.com/coda-popup-bubbles/ But I have separated trigger et popup like that : <div class="bubble_trigger"> <a href="javascript:void(favoris()); " class="trigger" title="Ajouter cette page dans vos favoris" ><img src="./banniere/icone/favorite.png" alt="Favoris" width="22" height="22" /></a> <a href="./forum/" class="trigger" title="Visitez le forum"><img src="./banniere/icone/forum.png" alt="Forum" width="22"
[jQuery] setData and extraParams problem
Hi All, When I do focus is on the autocompletion textbox, that triggers the function right below where the autocompletion plugin is initialized , which is supposed to add the "&key=value" values to form the remote url. Based on this remote url I am getting the filtered output, which will list out in the autocompletion textbox but its not adding "&key=value". So I am getting all the list. I think the setData is not setting the extraParams. help? For example: If i select one field in the Html form
[jQuery] Ajax Communicatiuon to JSp using Jquery
Hi Group Can you help me with sample code for communication with JSP file using JQuery Ajax communication Please do the needful Thanks in advance regds subbu
How to make menu like ipod drill menu?
Hi, I want to make a menu (not drop down) which will be of 100% width and height just like ipod drill menu. Can anybody know about such sliding menu and drilling down to each item..??? Or please guide me how to change this one to achieve my preferences. I want: menu options (not in a drop down) slides left into subcatogaries on each item click (like windows media center menu)....
[jQuery] (Validation) Problem with "All or Nothing" fields
I have a form with a block of 4 fields (3 selects and a text input) that have to either be all left empty or all filled in. I'm new to jQuery, and the Validation plug-in, so I probably have missed something here. I've been through the documentation, and have tried a number of things to get this to work, but no luck so far. Here is the block of HTML fields: <select id=SPLY_0 name=PRCH[0][3]> <option value=0>Select a Supplier <option value=5>Supplier 1 (304194) <option value=4>Supplier 2 (320815) <option
[jQuery] $.ajax and $.getJSON in not working in mozilla
hi.. I'm using $.getJSON to get data from WCF service in the form om json. this is working fine in IE7 but in mozilla it returns nothing. My code is $.getJSON("http://localhost:3162/VirtualService/Settings.svc/ GetAllCountries", function(data) { alert(data); }); this code returning me the list of countries in json format. so what to do in the case of mozilla.. Regards Dalvir
[jQuery] [validate] different rules on different events
hi, i am trying to get to work different rules on different events but i dont know where i am doing wrong? $("#registerForm").validate({ errorElement: "div", errorClass: "formerror", onblur: false, onclick: false, event: "onkeyup", rules: { username: { required: true, minlength: 4, remote: "check- username.php" }, email: { required: true, email: true, remote: "check-mail.php" } }, messages:
[jQuery] Date Text Entry Plugin?
Hi All I'm looking for a jQuery plugin for date entry. I *don't* want a date picker since they really only work well for dates that are close to today's date. My app requires the entry of dates from years ago (eg: Date of Birth) and that doesn't work well with any date picker I've tried. Also some of our users are doing a lot of data entry so anything that requires a mouse will not be popular. The way our application works at the moment is that we give the user a single text entry box for each date.
[jQuery] Autocomplete plugin: Google Chrome - Focus issue with the scrollbar
I am using jQuery 1.3.2. There is an input field in a form. Clicking on the input field opens a div as a dropdown. The div contains a list of items. As the list size is large there is a vertical scrollbar in the div. There is a blur event on the input field, to close the drop down when clicked outside, . Now the problem is: In chrome(2.0.172) when we click on the scrollbar, the input field will loose focus. And now if you click outside, then the dropdown won't close(as the input has already lost
form elements created with jquery dont .post
$("input").blur(function(){ $.post("/designyourown/scripts/post.php", { id: $(this).attr('id'), value: $(this).attr('value') } ); $('img#preview').attr('src','preview.php' + '?' + Math.random()); }); the above code works how it is supposed to with elements hard coded into the page but if i add more elements with this code var count = 2; $(document).ready(function(){ $('#addline').click(function(){ count += 1; // $('#addlinebreak').before( // '<strong>Link
Event in jQuery Plugin onPopupClose()
Hello, I need to catch an event in my jQuery Plugin if a popup window has been closed. This is how I open the popup: open: function(obj) { window.open(url + text, 'Title', 'menubar=no,width='300',height='200',toolbar=no'); } How can I define an event there? Thank you very much for your help, mannyk
[jQuery] open external web page inside the tab
I have the following code, basically i want to load first page of google into my "ajax tab 1". But i dont get what i'm expecting. Any idea? ================================================================================== <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>jQuery UI Example Page</title> <link type="text/css" href="css/ui-lightness/jquery- ui-1.7.2.custom.css" rel="stylesheet" /> <script
[jQuery] unable to put AllVideos inside
Hi I am trying to put some videos from YouTube, using the AllVideos- plugin, inside different tabs/slides (I put the code, {youtube}XXXXXXX {/youtube}, inside the HTML-field of the Jquery module. But no videos appear frontend, just the code... Is it impossible to put another plugin inside this module, or is it just me making something wrong? Cheers!
animate() and closest() + filter() or callback
Hi there. I want to animate ALL classes called ".article" to opacity=.2 and then fire a callback, which animates ONLY the closest ".article" to ".button" back to opacity=1. Know, what i mean? Here's the script: $('.button').click(function() { $('.article').animate({ opacity: '.2' }, 300, function callback() { $(this).closest('.article').animate({ opacity: '1' }, 300 ); }); }); What it does: it animates ALL ".article" classes to opacity=.2 but then the callback
[jQuery] empty() is very slow
While writing my first jQuery application I encountered a performance issue whichs casts doubts on the suitability of jQuery for my purposes in general. The "issue": In my page I have a dynamically filled <div> which in the end contains about 10 elements, one of which is a table with 1000 rows. Now when I try to clear that <div> with a simple function like function clearContainer() { $('#' + Container_ID).empty(); } this will take forever, i.e. one faster machine a few seconds, on my netbook it even
[jQuery] Help getting started with JSON (and PHP)
I need to return several values and I'd rather do it all in one ajax call. However there doesn't seem to be anything in data. Perhaps I'm way off here. I appreciate any guidance you can give me. Thanks :) This is my jquery $('#cart-pulldown').livequery('click', function(event){ $.getJSON(siteurl + "home/aj/showCart/", {}, function(data){ alert(data); }); }); This is the ajax in my PHP $tmp = ""; foreach($_SESSION['cart']
How to use jQuery to get value from $_POST
Hi, I thought this would be straightforward but i can't seem to find out or work out how to access a variable posted via a form on the previous page. I have the following line in some jQuery code: Code: $( '#ddlSelectBox > OPTION[value=8]' ).attr('selected', true); I basically want to check for the value sent via $_POST, then use it to make sure a dropdown is populated with the posted value (in the code above, where "value=8", i need to replace the 8 with whatever value has been posted. I have LiveHTTP
change css class onclick
Greets! First post here so hopefully I wont' sound too confused.. I have a set of links in a named div. each link has a specific css classname to emulate a button. Basic css menu thingy. <div id="buttonwrapper" class="buttonwrapper"> <a id='one' class="squarebutton" href="#" onclick="javascript:dosomething('one')" style="margin-left: 6px"><span>ONE</span></a> <a id='two' class="squarebutton" href="#" onclick="javascript:dosomething('two')" style="margin-left: 6px"><span>Two</span></a> <a id='three'
[jQuery] Image inside script
Hi all , This is my first post . please help me on one thing :) {$("."+errId).attr("style","display: inline; color: red");$ ("."+errId).attr("")$("."+errId).html(" Invalid Character. Numerals only.");} Now i want to add a image at the beginning of this. Its a small close button how do i append . please help me. Thanks Fabio
[jQuery] validate form
How do I change the ID commentForm here: $().ready(function() { $("#commentForm").validate(); into a variable of its own so that it can be declared here, which already has an ID declared: <form class="cmxform" id="commentForm" method="post">
[jQuery] Jquery Validation plugin doesn't working on ASP NET MVC
I'm trying to use the Jquery Validation plugin on aspnet mvc fframework but it doesn't work, when I open the firebug console it display an error: jQuery is not defined [Break on this error] jQuery.extend(jQuery.fn, {\n I don´t know how to fix this issue an had already added the jquery-1.3.2.js to my scripts, there is the valdiation code I'm using: <script type="text/javascript" src="../../Scripts/ jquery.validate.js"></script> <script type="text/javascript" src="../../Scripts/ jquery-1.3.2.js"></script>
[jQuery] Appending to a static string
Hello, as an example, https://twitter.com/signup when you enter in a username, a static string of "Your URL: http://twitter.com/USERNAME" has the USERNAME replaced with what you are typing in. This is day one of JQ for me. I was looking at the onkeyup event in JS in general, but I figure it is time for me to learn JQ. I am pretty sure I am going to <script type="text/javascript"> $(document).ready(function(){ // something fancy here }); html... <div> Your URL: http://example.com/USERNAME
Next Page