replace(). How do i grab the first 6 characters?
hi, im still new to jquery and i have a question. i have a string but i only need to know the first 6 characters. Is there a way to do this? Im thinking of using replace(), is there a better method? var foldername = 'FOLDERLongAndRandomName'; var regex = / NEED HELP HERE /; foldername = foldername.replace(regex,'');in the end var foldername should be 'FOLDER' only. thanks in advance to anyone that can help me with this. Im pretty stuck, plus documentation on replace() expressions is really beyond
how to create the queue effects using .animate function jquery
hey frnds, i m jquery beginner. i m trying to develop a tabed content slider. during this i am facing two problems. first i don't know how to create the queue effects mean, i want to animate first div, after completion of first animation than second animation would be started. for this i using the callback function here, but i want to know is there any other procedure to do this thing. second there is jerk in the animation at second and fourth tab. ur response would be appriciable. i m sending the
Syntax Error
I'm trying to use a third party script and I'm getting a Syntax Error on line 691 in Firebug. As I am very new to JQuery can anyone see anything wrong with this? Thank you. $('#uploader').ajaxForm({ 689 target: '#uploadresponse', 690 success: function(result){ 691 var data = eval('(' + $('#uploadresponse').find('textarea').text() + ')'); 692 if(data['Code'] == 0) 693 { 694 addNode(data['Path'], data['Name'],
I Cannot use the .load() function, Can anyone help?
i am using the jquery function $(#container).load('index.htm'); However, nothing will be happen. what wrong with me?
What is wrong with this if statement?
$(document).ready(function () { $('#mycarousel-next').click(function () { var z = $("ul.jcarousel-list-horizontal").css('left'); if (z == 0) { alert(z); } }); }); Doesn't ever alert. However every click this does. $(document).ready(function () { $('#mycarousel-next').click(function () { var z = $("ul.jcarousel-list-horizontal").css('left'); if (0 == 0) { alert(z); } }); }); What am I doing wrong with the first statement?
WHY:There is no uniform requirements for the callback function in jQuery
for example:the callback in jQuery.map( array, callback(elementOfArray, indexInArray) ) and the callback in jQuery.each( collection, callback(indexInArray, valueOfElement) ) Look similar but the parameters are reversed Why not make a uniform standard
Superfish Menu - HOVER Problem IE6
Hallo .. ich benutze das superfish-Menü für ein 2 Ebenen Klappmenü. Es funktioniert erfolgreich für alle Browser AUßER den IE6. Im IE6 funktioniert sogar das Ausklappen wunderbar, allerdings habe ich scheinbar ab irgendeinem Punkt etwas falsch gemacht, weil: - diejenigen Menüpunkte, die KEIN Submenü haben, bekommen den hover-Effekt nur beim direkten KLICK darauf und nicht beim hovern. Meine Listenpunkte bekommen alle IDs (kategorienamen) und dazugehörige Hintergrundbilder. Wie gesagt, für das Hovern
how do mimic form submission?
I am working with a mls provider. They provided forms for doing quick searches. The only problem is that the form redirect the user out side my site. I don't like that. What I would like to do is have them fill out the quick search pass the values to another page of mine and trigger the post to there site. Does anyone have any ideas? Thanks
need help for a gallery fade in/out
Hi, I still can't find a way to fade in/out on my main gallery pic. It seems pic is loaded before the fades start ... really need a solution .. gallery there: http://sedgene.free.fr/index.php?page=gallery Thanks
What is this for $(...)
New to JQuery. I have been working in ExtJS for the past year and have been doing various levels of JS for past ten years. However I don't know what this syntax is for. Example below from the tutorial page. But does not tell me what the heck syntax $() is. Would someone please explain to me why it is used and what for example the $("a") is suppose to be pointing to? <script> $(document).ready(function(){ $("a").click(function(event){ alert("As you can see, the link no longer took you to jquery.com");
How do I turn off a selector?
Good day, I have a global stylesheet. In that stylesheet I have: .index .left #search_accordion .flyout {position: absolute; top: -9px;} I need to turn off the top:-9px, because IE7 renders my menu wrong with it there. I have a stylesheet for IE that overrides global which I set to: .index .left #search_accordion .flyout {position: absolute; top: 0px;} or .index .left #search_accordion .flyout {position: absolute;}. When I make top:0px, I get the wrong positioning. When I leave don't include
Scope problem, trying to figure out.
Hi guys, I'm trying to get an XML through the Ajax function of Jquery, the code is something like this : function getXML() { var XMLResponse = $.ajax({ type: "GET", url: "teste.xml", dataType: "xml" }); var Xml; XMLResponse.success(function(data){Xml = data;}); console.log(Xml); // I would like to put here a return(Xml); but it goes as undef to the console. } I'm sure I have an scope problem over there, just don't know how to go around. I just would like to spit
It just stopped.
Hi, At first excuse my for my - sometimes - crappy english. I got a problem. I just started using jQuery, and it worked fine, but from the one to the other moment it stopped to give an alert of refresh the page. Here is some code: <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function() { var refreshId = setInterval(function() { $.get("values.php", { v: "host_refresh" }, function(data){ if(data == "refresh"){ location.reload(); }
How to get to specified item in jquery array
I have something like this: var images = $('#container img'); // my new array images.get(images.length - 2).addClass('show');error is like this: Error: $("#container img").get(images.length - 2).addClass is not a function I think it's not a big issue
Execute a sequence action in a time
How do I perform an action in a given time? Example, I want to make my div to grow at a speed of 50 seconds to its original size. Example, I want it to go from size 0 to size 250px height in 50 seconds. I have no idea how to do this.
Error in calling jquery funcion
Using jquery,I import some content from secondpage to firstpage.. Its working properly but when i give image pop-up jquery funcion in secondpage content its not working... Alone second page run its working corectly..... why?
document.anchors as jQuery argument
in the docs its mentioned that you can pass DOM elements in the jQuery function like this jQuery(document) etc i was trying to recreate this example http://www.w3schools.com/jsref/coll_doc_anchors.asp with a line of code similar to this jQuery(document.anchors[0]).addClass('checkIfIsAdded'); which doesn't seem to work jQuery(document.anchors).addClass('checkIfIsAdded'); is not working of course for achieving the same effect i could use jQuery('a').addClass('checkIfIsAdded'); but i am wondering why
Nested divs: making content visible
I'm trying to debug a tabbed menu implementation, where I have a variety of pages that are made visible based on tab clicks. This works well, until I have a page that is laid out with nested divs. Any content beyond the child of the selected page (page_about shows 'Put an image here' but not 'This is where...') remains invisible. I've tried a number of options in the slideDown statement, but failed thus far. Thanks for any help, Frank The HTML excerpt looks thus: <div class="boxBody"> <div id="page_home"
Opening a new HTML after an animation
I'm sure that this is easy enough, I'm still clueless as to how to make it happen. I want to click on a picture, have a shade slide across to "close" the image, then open a new html in the same window. I can do both independently, but the page opens off the <a> tag instead of any jquery I know to use, so the new page opens before any animation happens. what can I do to fix this?
Find class in next UL
I have a hover fuction that returns a jquery object when it finds an anchor. What would be the test statement to see if the next ul has a class of 'secondary'? Then if this is true I would display it. Thanks! <li><a href="#">Buy Tickets</a></li> <li><a href="#">Group Sales</a></li> <li> <a href="#">Reviews</a> <ul class="secondary"> <li><a href="#">One</a></li> <li><a href="#">Two</a></li> <li><a href="#">Three</a></li> </ul>
Quick question about moving another <div> with an animate event
Hey! First post here :) This week I started learning jQuery and it's awesome to say by the least! Anyways, I stumbled upon a problem. This is the situation: There are 2 huge colored blocks just above each other on the page. Both blocks are div's with a class named "blue" and "red" (red is above and blue is beneath). I would like to make an animation with the red block so it will go down about 200px AND the blue block should be pushed away 200px as well. Is this possible? If so, how do I do it? I
Possible to animate something and elements adjust to that?
Hey! Just wondering if it is possible to let a huge blue block be moved 200px to the right and everything that is right of the blue block will move with it? So the elements adjust to the blue block's position Thanks
simple .load problem
i can't seem to get .load() working. i am sad. please help? simplest setup i could put together: [index.html] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="js/jquery-1.5.js" /> <title>Test</title> <script type="text/javascript"> $(document).ready(function () { alert("jquery
find sub list and names.
In attempting to modify a script of a menu, that I wanted to add the ability to have sub menus, I first wanted to find out if an ordered list element, contained a secondary unordered list and what their names are so I could out put the items to the console. Here is the test list: <div class="nav-wrap"> <ul class="group" id="example-one"> <li class="current_page_item"><a href="#">Home</a></li> <li><a href="#">Buy Tickets</a></li> <li><a href="#">Group Sales</a></li> <li> <a href="#">Reviews</a> <ul>
Displaying Text following mouse hover
Hi there. I wonder if anyone can help me? I want to create a webpage that has a grid of 8 images displayed on the left side of the page. All the images are "dimmed" by default and when the user moves their mouse over an image, it lightens to its normal state. What I want to do is when they hover the mouse over an image, display a chunk of text in the area to the right of the image grid. Essentially, the images act as a kind of menu and when the mouse hovers I want some details to be displayed.
email already registered
(my apologies to the moderator i have reposted this under another account just five minutes ago, but i thought since i will be using this forum i should create an intended-to-be-used account and write in a piece of paper this time my user name and pass. another apology for posting this in getting started but i couldn't find a support section) i tried creating an account with my standard email and got a message that my email is already registered. my emails are all safe, so i suppose its a false alarm,
someone has registered my email
i was trying to sign up for an account with the jQuery forum, in order to ask this simple question: why isn't jQuery(document.anchors[0]).addClass('enabled'); working... (or any line of code similar, using the document.anchors array of js objects) and i run into a bigger problem, while registering i got the message "your email account is registered with another user" so i created this temp account only to ask if this has anything to do with it being a zoho account, and perhaps i have signed up with
Resize event doesn't work in firefox
Hi, I'm fighting with the following problem. I'm new to jQuery so everything is a bit blurry. I have some programming experience with as3, but jQuery is although better, quite new for me. The problem is as follows: I have a css sheet with 3 different body classes .large, .medium, .small which is added at body on resize depending on window.size. Everything is working fine in Safari, Opera and Chrome. Only firefox is what kills me now. The code:// JavaScript Document function checkWindowSize() {
Toggle need to click twice
so i basically have many anchor links where when i click each of them it slidesdown its own div with some text in it... so have i wanted is when i click on one link it will show me the current one and hide the others.. this is what i have tried which works great but when i click on a link it opens the div , then click on another one opens the div with one click and when i go back to re-click the previous link i have to double click it in order to work.. this is my js code: $(".anchorlink").toggle(
Reading XML and trying to insert in localSQLDB via javascript
Hi, I'm currently learning myself to build an HTML5 app with JQmobile and Jquery that later will be turned into a app via Phonegap. I've recently started to play with reading in items from a xml which then are supposed to be put into the local SQL lite db that you get access to in HTML5. The problem I have is that I do not seem to be able get the INSERT into the DB to work. I know I can read my XMl as I am able to output the contents fine on the page but when i use the same variable for the DB insert
is this a case for switch case? (or am I using the most efficient method)
I want to change the htmltext of a div depending on the body.class $('body #header').html('you are still here'); //DEFAULT if no body class $('body.welcomepage #header').html('hello'); //IF bodyclass is welcomepage $('body.goodbyepage #header').html('goodbye'); //IF bodyclass is goodbypage What is the best option for performing this? Should I use an if, elseif, else? Or should I use a switch case? My concern is that the above may cause issues because its looking for body.class(es)
Can't get this to work
I have try to combine - Custom HTML form checkbox and radio buttons (http://plugins.jquery.com/project/custom_radio_buttons) with - jQuery Form Wizard (http://thecodemine.org/#_demoForm=first) as a quiz for kids where answers are colored radio buttons (Green/Red/Yellow). Somehow custom radio buttons (G/R/Y) are working when I have not "wrapped" all questions, but when I will "wrap" everything to a wizard version custom radio buttons show up only on a first question and all the rest is blank/not displayed.
perl $ interpolation prevent function
Hi there, I got a question as I just started working on JQuery today. The problem is that when I try the following: <script type="text/javascript" charset="utf-8"> $(function() { $('.date-pick').datePicker({autoFocusNextInput: true}); }); </script> inside a perl CGI script, the $ sign is gone as the perl interpolate the $ sign as variable. Any input will be greatly appreciated! Thanks. Best, Peter
Event not working
I am having a problem with some code that I am working on. The code is shown below. Basically, I have a page that if you click on one of the links, it uses the .load method to pull in a php document. The php document displays a form (since nothing has been submitted to it yet) that has an input box and a button to launch a search. I attach a click event to the button, however, when I click it, nothing happens. I monitored the script in Firebug, and it appears that the event handler does get attached
Insert a new html element before another
Hi. I have a td like this: <td id="info"> <a href="#" id="linkfirst"> <span id="first">First</span> </a> <a href="#" id="linkprevious"> <span id="previous">Previous</span> </a> <a href="#" id="linknext"> <span id="next">Next</span></a> </a> <a href="#" id="linklast"> <span id="last">Last</span></a> </a> </td> I want to remove the two first links and leave only the <span> tags. I remove the first two elements doing this: $('td#info a').first().detach();
Append method without moving?
Hi. There is no method to append an element to another without moving? I think that the only solution is to use .html() method. Is this true?
calender help can anyone help ???
hi i need to do a concept using calender where i need to put a list of holidays . the holidays days alone should be an image and when i click an the holiday a new pop up window should open up with the name of the holiday.. can anyone help pls ?????????????????
Jquery as a text scroller, HELP
Hey everyone, I am very new to jquery and have a project that i need to finish. I am using jquery as a text scroll (jcarousel) to pull recent articles from a blog. Everything works great. EXCEPT, I would like to have the links open in a new browser if possible. Here is where I THINK the code needs to be changed?? But i am just to new to make the edit, Your help is appreciated. // JavaScript Document function mycarousel_initCallback(carousel, state) { // Lock until all items are loaded. That prevents
Check textbox values on the front-end before submitting to server-side logic
Room, Hi. I am new to jQuery, and learning more about Js by doing. I can hand-code HTML and CSS very well and understand OOP effectively. However, troubleshooting complex Javascript code combined with jQuery is a challenge to me, but I really want to learn. I am using Windows XP Professional and IE 8, FF 3.6. That said, I will attempt to explain what I need to do. Description: The page is being written on the fly. There is a server-side function that cannot accept zero quantity values.
How to throw alert
I am trying to throw an alert with the attributes of a submit button in the alert. What am I doing wrong? $("document").ready( function () { alert("#SubmitButton").attr("attr", value); $alert("#SubmitButton").attr("attr", value); });
Next Page