Basic question about $(this) and > , and ! or .not
To start: $('#menu > li').mouseenter(function () { var $this = $(this); tabOpen($this); } }); I'm assuming that when the mouse hovers on any menu item, that $('#menu > li').mouseenter(function () determines which menu item or li object it was that fired the event. That object becomes $(this) and is assigned to the var $this, which is then passed to the tabOpen() function. function tabOpen($this) { $('a', $this).stop(true, true).animate({ 'top': '15px'
How to connect my website with my own made jquery site?
Hello, I've made my website with Artisteer 4 and Artisteer automatically creates a responsive design. But i've made my own mobile website with jquery and when i visit my own website with for example iphone i see the responsive design that artisteer has created. When I visit my website using a mobile device I wish that I get to see the mobile site of jquery. How can i do that. I've tried to upload the jquery files to the same folder als my website but i didn't work. Gr Boris
Why script doesn't work
Hello dear jquery people. I'm new in jquery I have some code: My index html: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" > <link rel="stylesheet" type="text/css" href="test.css"/> <script type="text/javascript" src="jquery-1.10.1.min.js"></script> <script type="text/javascript"> $(document).ready(function() { (function ($) { //тут превращаем select в input var id = "test", $id = $('#' + id), choices = $id.find('option').map(function (n,
automated tool to identify unused js functions?
Hello - I've been asked to remove all unused js functions from an application. What's the easiest way to do this? It seems like it would be pretty easy for an automated program to do this. For example, a regex to find each function xxx() in the code base and then perform a text search for xxx references. Are you aware of any existing automated tools that do this?
how to auto-format/structure single-line js?
Hello - I'm trying to peruse the script contents of a js lib. However, when I open the js script lib in VS2010 the script displays as 1 long line instead of displaying in a structured format. Is there a way to display a script like this in VS2010 in a structured format or is there another tool that will do this for me?
How to refer another javaScript file to some other javaScript file?
Hi, I have created a .js file where i want to use jQuery functions. But i am not sure how my js file can refer to the jQuery library. Is there any way to import the jQuery library to some other js file? Thanks
id for <p:calandar> input inside a datatable
I need to get the correct id of the input inside a datatable for masking. I have used inspect element to check the id. It shows "datatable_attributes:3:att_date_input". But the id seems not the correct one. If the calendar is outside of datatable, it works fine. Currently my calendar is inside a datatable. xhtml <script src="../../scripting.js"></script> <script type="text/javascript"> jQuery(function($){ $("#datatable_attributes:3:att_date_input").mask("99/99/9999");
Size of jQuery mobile scripts
Hi there, I have a mobile web site that uses JQuery framework but the size of the JavaScript and CSS files is bit big: JavaScript jquery.mobile-1.3.0.min.js (in minimized format, size is 144.4K) CSS jquery.mobile.structure-1.3.0.css (in readable format, size is 79.7K) jquery.mobile.theme-1.3.0.css (in readable format, size is 49.6K) Those figures were taken with YSlow running on my Firefox desktop browser. I have two questions: What can be done to to reduce size of those files? Is the size of files
Adding TextBox to FrameSet/ Frame
Hy Guys :D I was helped here a few days ago and i need help now too :/ the problem is .. I'm using C# to create my bho to add Jquery to Website ( I can't change the website by the programmer-side ( can't modify the website but the website have Jquery Lib :D yes <3 ) Here come the problems : The website doesn't have <body></body> Just have <html><head><title><form><frameset id ="fs" ><frame id=frmMenu><frame id="frmMain"><noframes/> and that's it ... soo how can i add this textbox code ... $('<input
Any themeroller for svg like jquery?
I need to change my svg application css style by theming like this jquery themeroller. Is there any suggestions to change the css of svg elements by theming or how to support jquery themes to svg. Is there any themes provider for svg? any suggestions should be appreciated..
how make sintaks in jquery more solid so as another person can't read sintaks
how make sintaks in jquery more solid so as another person can't read sintaks ??i have been ever told by my friends but i have forgotten,,please help me brother and sister
Want to update text in <p> element
Hello, I am a JQuery newbie. I have been trying to perform a simple task of updating the text in <p> element after the page loads. Here is a very simple script and code I am using <!DOCTYPE html> <html> <head> <style> p { color : blue; margin : 8px; } </style> <script src = "jquery-1.10.1.min.js"></script> </script> <title>My JQuery Tests </title> </head> <body> <p> My JQuery Tests On This Page </p> <script
active script
how i can make this work? : $("a").mouseout(function(event) { alert(event.relatedTarget.nodeName); // "DIV" }); i try html:<a href="#">ff</a>and mouse out didn't work
my code based on fiddle doesn't work.
I've seen a nice jquery fiddle.. however when I try it with my coding it doesn't work at all So I wonder what's wrong with it.. The fiddle: http://jsfiddle.net/CdwB9/4/ My coding: <html><head><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> </head> <body> <script > function yesnodialog(button1, button2, element){ var btns = {}; btns[button1] = function(){ element.parents('li').hide(); $(this).dialog("close"); }; btns[button2] = function(){
jQuery UI
how to install the different jquery UI in same html page.
how to show a full page when presing the ok button in jquery dialog box in frameset
HI I am using frameset and the codes are <frameset rows="33px,*" frameborder="no" framespacing="0" border="0" onload="x()" > <!--<frame src="logout.jsp">--> <frame src="home.jsp" scrolling="no"> <!-- <frame src="home.jsp">--> <frame src="template.jsp" name="content" > </frameset> now in each and every page i am checking whether there any sessions exist or not. if not then go to failedsession.jsp function x(){ var timeOut =1000 * <%=session.getMaxInactiveInterval()%>;
highlighting a table row
I've got a select box on my website.. with one of the options being 'delete'. This 'delete' should highlight a certain row within a table, and redirect the user to an other page. I've got the coding below, but it doesn't highlight the table row at all. What am I doing wrong here? <script language="javascript"> $(document).ready(function() { $('select').change(function() { if ($(this).val()=='delete'){ $.ajax({ var parent = $(this).closest('tr'); parent.animate({'backgroundColor':'#00B2EE'},300);
Load content into div after clicking <li> link
Hi guys, I'm very new to all of this so please have mercy on me! Anyways, I've got a <ul> navigation bar set up, here's a live link to that: http://www.chocolateaccents.com/test/yearround.html I'd like to load content into a DIV that would be below the navigation bar after one of the <li> links are clicked for testing purposes the content can just be html but later on I'd like to make it html with PHP How would I go about this? Thanks to anyone willing to help my sad little self.
Problem with using radios values on Jquery
for example i have this code in HTML <div> <input type="radio" id="respuesta1" name="respuesta" class="respuesta" value="1"> </div> <div> <input type="radio" id="respuesta2" name="respuesta" class="respuesta" value="2"> </div> <div> <input type="radio" id="respuesta3" name="respuesta" class="respuesta" value="3"> </div> <div> <input type="radio" id="respuesta4" name="respuesta" class="respuesta" value="4"> if i do on Jquery if ($('#respuesta1').is(':checked')) { alert ("1 is checked"); } that is
Problem with variable inside ready Jquery
Well i have this problem i want Number to be readed outside the function, its a function for a dice that everytime you click on in you will get a random number. The problem is that i can only see the variable inside function asd2, if i alert or anything on function asd it doesnt let me.... $(document).ready(asd); function asd() { $("#lala").click(function asd2() { var Number= Math.floor(Math.random() * (6 - 1 + 1)) + 1; }) alert (Number);
how to show upload status in a form using jquery?
Hi Good evening to all. I want to upload some files using jsp and i have done that. If the size is very large then it should display some status and for that i have done like this http://jsfiddle.net/utDRh/ But the status is not showing. Can anybody help me please. this is the jsp codes. <% response.setContentType("text/html"); response.setHeader("Cache-control","no-cache"); String err = ""; String lastFileName = ""; String contentType = request.getContentType(); String boundary
validation phone
hi i don’t speak much English , sorry. how can i use validation phone number ? i used this address but it was not helpful : http://www.htmldrive.net/items/show/867/Useful-Masked-Input-jQuery-Plugin my code : <!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>Designing Modern Web Forms</title>
Onclick does not work but onmouseover works!
Hi; This is about IE. In Firefox its all good. I am calling the same function with onclick and it does not work. When I call the same funciton with mouseover it works fine! What am I doing wrong? Thank you Does NOT work: <div class="option" onclick="edit_value('This Opption 2');"> This Option 2 </div> This works fine: <div class="option" onmouseover="edit_value('This Opption 2');"> This Option 2 </div> function edit_value(argument) { $(".behnam").html(argument); }
Manipulating dynamically added content
Hello - just to warn you again, I'm new to Javascript, JQuery and HTML so apologies if I use the wrong terminology and misunderstand things. I want to make modifications to the attributes of some of my page elements when the document is displayed in a web browser. At the moment I use: [code] $(document).ready(function() { $('.myclassname a').each(function() { someElement.attr("title", 'My new title'); } } [/code] - and so on, which works perfectly well for static pages, but doesn't work
why is the flip on my page not working.
Hello, I found this page : 20thingsIlearned.com Im using now the javascript files from the source which can be found here: http://code.google.com/p/20thingsilearned/source/browse/#svn%2Ftrunk%2Fwar%2Fjs But when I try to use it nothing happens. See my page : test.tamarawobben,nl Anyone who can help me to make this work? Roelof
Need help with implementing a function on hover in Galleria.
I have put together a galleria image gallery for a client, who has requested that the thumbnails along the bottom of the gallery scroll as the arrows on either end (see circled in picture) are hovered over. I am new to javascript and jQuery, but I tried to customise the code to achieve this effect. I managed to get the main image to change on hover of the thumbnail navigation, by adding the code below to galleria.classic.js - but of course I don't want the image to change, I want the thumbnails to
2 Textbox Watermark's
Hello Forum, This is my first post, I have been using query for about a week, so I am very new. I have a form I have made where I want Jquery to add a watermark to a couple of textboxs. I can do it, but I have a couple of problems 1) currently I need to repeat the code (once for each textbox) 2) It has a dependency on the HTML $("#requirements").focus(function () { if ($(this).val() == "Enter any extra requirements here....") $(this).removeClass("watermark").val('');
Menu toggle for responsive design IE8!!
Hi, I have made a drop down menu system for a responsive website, but for some reason IE8 does not like the following code: $(".menu-toggle").on('click', function (e) { $("#main-nav a[class^='menu-item']").each(function(i) { if ($(this).hasClass("menu-item-on")) { $(this).removeClass("menu-item-on"); } else { $(this).addClass("menu-item-on"); } }); e.preventDefault; }); It looks like it is
window.location.href
I have a form <form action="abc.php" method="get"> <button id="b1" class="signInInput" value="hid2" onclick="signUp()">Create Free Acount</button> <button id="b2" class="signInInput" value="hid1">Sign In</button> </for> on click the page redirects to abc.php but I want... button .. id=b1 .. on click the page redirect to xyz.php my jquery is: function signUp() { window.location.href = 'user/user.php?val=nnnn'; }
Filtering h2 from h1,h3,h4..........(all headers)
Hi, I am new to web development (3 months). I am learning JQuery now. I am writing a small html code which has h1, h2, h3 and h4 header elements. There is a button as well. Once the button is clicked I want to have red color background to h1, h3 and h4. I need to filter out h2. This is the code I wrote, but not working though. Please help me. <script> $(document).ready(function(){ $("button").click(function(){ $(":header").filter($("#h3")).css( 'background-color' , 'red'); });
About jquery header rotator
Hi all, Is there Free jquery header rotator for WordPress running on Linux? If YES pls advise where to download? Thanks Rdgs satimis
Which jQuery functions apply to containing window w/out parent-child?
Some JavaScript functions like window.resizeTo will work on the same browser window where the JavaScript resides. There is no parent-child relationship, like using a script with CSS to turn a DIV into a new window with specified traits. I'm wondering what jQuery functions have the same capability, and what rules govern their use? This would appear to me to be a specific category of functionality. -Okieuser
getting false return when sending data to a php script
I'm trying to send some data to a php file with my jquery script. However it doesn't seem to work, as I'm getting a false return whatever I'm trying. Can anyone tell me what I'm doing wrong here? Please note, the php file isn't doing much.. it's just for testing purposes. <script language="javascript"> $(document).ready(function() { $('select').change(function() { if ($(this).val()=='delete'){ var parent = $(this).closest('tr'); $.ajax({ type: 'post', dataType: 'html', url: 'process.php',
jquery Knob plugin Combination Lock
Hi there everyone, Sorry, I know this is for a plugin and should probably be in the plugin section, but I'm also extremely new to jquery and js in general, so please, no flaming. My question pertains to this plugin: http://anthonyterrien.com/knob/ I'm curious whether you think it would be possible to create a combination lock with 3 of these in a circle. The idea being that it would only proceed to the next page if the correct combination was entered, preferably the combination would not be in plain
HTML link fail to load in my jQuery Mobile Site.
Hi, I'm having trouble linking my HTML file using a href"#". Please advise am new to this. <div class="ui-btn-text"> <a href="file://server/Volume_1/vwa/www-mobile/corporate-why.html" data-transition="fade" class="ui-link-inherit">Why Choose VWA</a> </div> Error: OPTIONS file://server/Volume_1/vwa/www-mobile/corporate-why.html Origin null is not allowed by Access-Control-Allow-Origin. XMLHttpRequest cannot load file://server/Volume_1/vwa/www-mobile/corporate-why.html. Origin null is not allowed
active script
can i in some way active this script : function page(n) {
// Wrap the window in a jQuery object
var w = $(window);
// Get the size of a page
var pagesize = w.height();
// Get the current scrollbar position
var current = w.scrollTop();
// Set new scrollbar position n pages down
w.scrollTop(current + n*pagesize);
}
this script is from a book he didn't work in Jsbin.
Error in passing jsonValue(include escape characters) to parseJSON
My Json ouput is : [{"Name":"Test'","Phone":"9000000010"},{"Name":"Test'","Phone":"9000000010"}] Name contains Name+' I am passing this result to parseJSON, it throws unexpected string error.If any one help to get this answer.Its urgent. My code : var result = $.parseJSON('{!result}');
The first way to do this, to use jquerymobile.
Hi, I am new to jquery and I ask you please help me to use this jquery, I have a site that I want to design with jquery. What should I do first? and for me just starting out, what just by downloading the zipped folder continued my jquery installed on the site say, what it is to be working for my site? and needs to know. and I want to display an image on my site. help me
Problem of getting two slide divs
How to make two divs content to slide to the left and disappear and the other one comes in the middle and click back the one from left comes from middle and the one from middle goes back and disaapear e.g please check the sites carefully to see what i am talking about when chick the accordion links after open then you click the links again inside the accordion you can see the sliding div https://www.itskillsacademy.ac.uk/it-professional-profile/
how to bookmark? It's dictionary app.
In dictionary app, is it possible to make a bookmark? (I want to bookmark items what i have searched) If possible, are there any examples?
Next Page