Can I detect if a menu option/element dropsdown over another div/element/field
Hello, I have a menu that when I hover over a link it dropsdown exposing other menu options. On certain screens it drops down over input field. Making them inaccessible. Is there a way I can detect if my dropdown menu option is displaying over another field/div?
protractor with JQuery
Hi, I would like to have a very simple protractor to users, to help to measure angle on a photo. I am apparently very JS beginner but maybe somebody can help? Let's have an image with television and imaginative blue axis x which will not be visible in the JS tool, but it helps me to explain how the tool should work. I would like to measure some angle for example in the profile view, and I will draw the red line and blue angle to show you which angle I want to measure. Now as the description
thoubleshooting to applying css.
here I am making 10 divs and applying amit class, that's working fine showing required output but when I am applying top left position random and random color it's not showing correct output. here my code. var randval=Math.round(Math.random()*100); for(i=0;i<10;i++){ mythumb=new thumbnail(); var r=Math.round(Math.random()*99); var g=Math.round(Math.random()*99); var b=Math.round(Math.random()*99); var color=('#'+r+''+g+''+b); var left=Math.round(Math.random()*300);
Get and Set Language for Text Block
Hi all, I need to get the current users browser language and use it as a variable so that I can translate a block of text. Any clues? Thanks, Kelly
How to Show div on multiple class "active"
Hi, can anyone help me in this. i need to show $("#content") when 2 checkbox are checked and one span get (active) class on page load or user action. default $("#content") will be hide. if user checked 2 checkbox and span get active class on it. then $("#content") will be shown. ---HTML--- <input type="radio"checked> <input type="radio"> <span>Text</span> <div id="content">content</div>
adding click-event to self on click-event
See the example: http://jsfiddle.net/2DpBG/1/ I would like to have the alert fired on the second click. Any ideas?
animation sequences within divs
hi all, just wondering if anyone can shed some light on how to animate elements within divs on a page - so that when the animation is triggered it plays and then reverses/plays back to the beginning? sorry that my description is a little vague - a good example of what i mean can be found here i particularly like the way that the books on the right hand side react to a mouse over... ...and... before anyone points out the obvious - i appreciate that it 'is' done using flash - but i was wondering if
fixed lines of paragraph tag
Hi All, I have a requirement where i have some text in the <p> tag... Now i want to show only two lines of the p tag and truncate the remaining content in the <p> tag . This can be achieved by fixing the height p tag but i have a anchor tag at the end which also should fit into the two lines.... <p>lorem ipsum lorem ipsumlorem ipsumlorem ipsumlorem ipsumlorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum<a href="#">anchor link</a></p> This is
what is the need of CHANGE() event in jQuery ?
Can anyone help in this ? How to use change() event in jQuery . Explain me what is the need of it by giving an example. Thanks
Append <a href> with some string and "alt" of the child image
I have been trying to accomplish something. For every a tag enclosing an images, I am trying to append some strings along with the 'alt' attribute of the image to the end of <a> tag's href attribute based on the condition that, if a:contains('?') then it will appended with "&text" else , append with "?text" my script goes like this, <script> $(document).ready(function() { $(document).ready(function() { $('a').each(function() { var baoBao = $('a').children('img').attr('alt');
anchor tag is not working when trying load html in to div
Hi I have some html which I saved in .html file. I am trying to load this using below jquery function $('#portfolio').load('Grocery.html'); . When I am using above code my anchor tag is not working. Please help me on resolving this issue. <table style="border-collapse: separate; border-spacing:70px 5px;" > <tr> <th> Flour&Grains </th> <th> Rice&Poha </th>
autoComplete Source
I am using the following code to implement my autoComplete... $('.autoDate').autocomplete({ minLength: 1, autofocus: true, source: function(request, response) { $.getJSON("files_json/auto_Timesheets_Date.php", { tsEmpNum: $('#ts_EmpNum').val() }, response); }, //source: 'files_json/auto_Timesheets_Date.php?tsEmpNum=' + $('#ts_EmpNum').val(); select:function(evt, ui) { form_edit.ts_Date.value = ui.item.tsDate;
Issue with the document.getElementById('editor') in JQuery
All, I have a JQuery script as follow: <script> $(document).ready(function() { var buttonSelected = '${docEditorReviewCaseData.buttonSelected}'; console.log(buttonSelected); if(buttonSelected == 'Save'){ console.log(document.getElementById('editor')); document.getElementById('editor').SaveURL('${docEditorReviewCaseData.saveReviewCaseXMLURL}'); } }); </script> When I run this jsp page in IE 8 with
How to show ajax loader until all the images are load
HI, I am doing a image gallery using the jquery mobile. I am fetching the images from a remote database. Some how i managed to show the ajax loader, but it not working fine. I need to show the loader until all my images are completely loaded. Looking forward for a solution. Thanks
view information from div slideup and slidedown
I'm working on pagination using table called pagination.php, pagination have 10 rows per page, each row have a link called "Edit" to allow me to view more information by redirect to info.php page. And now instead of redirect to info.php, i want to show in same page pagination.php, meaning to show information inside of div slide up and slide down using jquery slidetoggle, see the code ..... $(document).ready(function(){ $("#edit").click(function(){ $(".edit-page").slideToggle("slow"); });}); and
<source> tag...how to change src?
Do jquery support <source> tag? How do update the src attribute? <video autoplay> <source src="myvid.mp4"> <source src="myvid.ogg"> </video>
Use of getPreventDefault() is deprecated. Use defaultPrevented instead
On my html page , on click of a checkbox i am getting error Use of getPreventDefault() is deprecated. Use defaultPrevented instead. @ https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js:3 due to this error, the checkbox is not getting checked.I am using firefox browser. my html code for this checkbox is <input type="checkbox" name="recipient.Subsidiary" value="true" id="recipient.Subsidiary" /> <input type="hidden" id="__checkbox_recipient.Subsidiary" name="__checkbox_recipient.Subsidiary"
Jqplot & JSON data from Ajax Request
Hi, I wolud like to have jqplot graph with actual data beside on user choose in select (html element- alias comobobx). I found this working example (from this thread), but still can not understand, why my code doesn't work: http://jsfiddle.net/A24cm/ edit: problem is, that data must be vartype array, not string... but how to build array on returning string? data.split(';').each(function(){ ... new Array(left, right) }); ¯\_(ツ)_/¯
Using JQuery in a bookmarklet
I'm trying to create a relatively complex bookmarklet that uses jquery as well as some other large scripts. I know the trick of inserting <script> tags in order to load jquery and my own script. What I can't figure out is a reliable way to wait for jquery to be loaded so that I can continue execution of my scripts that use $. Right now I'm trying to busy-wait for $ to be defined, but sometimes that seems to totally hang my browser if there's some problem fetching jquery. I could add a timeout
Exchange content of two divs with a seem class name
Hi Suppose i have two divs with the seem class name for example "column", how to toggle theirs content when user click and with a sliding animation if possible. For example : <div class="column">Content 1</div> ... <div class="column">Content 2</div> ... <span class="togglediv">Toggle</span> When toggle span clicked, the result will be : <div class="column">Content 2</div> ... <div class="column">Content 1</div> ... <span class="togglediv">Toggle</span> Thank you
jAlert is not working the JSP code
Hi, jAlert is not working the JSP code. I am checking if jQuery loaded and based on that displaying alert using jAlert if(typeof($) != 'function') alert('This component requires jQuery.'); else $(function() { jAalert('The DOM is ready for jQuery manipulation.'); }); can you please tell why its not working
Is it safe to pass plain text password to jQuery.get()?
Title. $("form").submit ( function(event) { $.get ( "/php/scripts/authenticate-user.php", { email: $("#email").val(), password: $("#password").val() }, function(response) { $("#result").html(response).show();
Highlights some <p> class
Hi guys, im new in jquery but im trying my best. Here's the problem, i have this "formulary" with some questions i made with <select> and its working fine. but i need to highlight some paragraph on the text when the guy marks the correct option. heres some part of the structure( if you want i'll put the whole thing) <p> text text text text <p class="class1"> TEXT I NEED TO HIGHLIGHT WHEN DUDE SELECT'S RIGHT OPTION<p> text text text <p> function verificaQuestao1(){ resetaAlternativaQuestoes1();
jquery settings wiped out when I cover webpage with a div
I have a webpage with JavaScript and jQuery. It initializes some global variables, and runs a (document).ready routine. But I also have a button on the page, that when it is clicked, causes a DIV to appear that covers the page. The DIV's CSS class is: .overlay { position:absolute; top:0; left:0; width:100%; height:100%; min-height:100%; z-index:1000; display:none; } Note that normally it is invisible, because the display is set to NONE, and also note that it
problem with toggle (shows and hides many times)
I made a toogle navigation and it doesn't work. when I click on a link in the menu, the toogle appears and disappears several times. I'm really new in jquery. Could you help please? <script type="text/javascript"> $(document).ready(function(){ $(".btn-open").click(function(){ $("#panel").slideToggle("slow"); }); $(window).resize(function(){ if ($(window).width() < 1024) { $(".navigation li").click(function()
JQuery Load and missing data
Hello ! I have a webpage containing lots of php and JQuery code. From this webpage, I use the Load function to open popup window and load webpages inside it. I noticed that, randomly, I get some console error about "typos" in the code when opening the webpage, like "var foo 10" instead of "var foo = 10". Weird thing is, what's really in the webpage is "var foo = 10". When I check the post performed when the load function is fired, I can see it load the page with missing/modified data randomly, causing
Ajax problem can't figure out
I have a slect menu that i am passing value to ajax ...this is giving me constant error but should be simple. Does anyone see what I'm doing wronmg. Using jquery-1.10.2.js with http://code.jquery.com/jquery-migrate-1.2.1.js CODE: $("#Dcust").change(function () { $("#Dcust option:selected").each(function () { var BCN = $("#Dcust").val(); var request= $.ajax({ type: "GET", url: "PM_incl_FiscalPeriod.asp?BCN="+BCN }); request.done(function(msg){ $("#FIDcontainer").html(msg);
Problem using word search and highlight
Hi! I was looking for a simple search and highlight code and I found this one: $(function(){ function searchAndHighlight(searchTerm, selector) { if(searchTerm) { //var wholeWordOnly = new RegExp("\\g"+searchTerm+"\\g","ig"); //matches whole word only //var anyCharacter = new RegExp("\\g["+searchTerm+"]\\g","ig"); //matches any word with any of search chars characters var selector = selector || "#bodyContainer"; //use body as selector if none
Enable checkboxes by another checkboxes
Hi Guys, I using following skript to enable/disable checkboxes depend on other checkboxes. Any idea how to make this script more simple and general. For example if I will need to add another group of checkboxes in the future or if there will be more than two levels. Fiddle HTML <form name="" id=""> <input type="checkbox" name="" class="controller01" />Controller1 <input type="checkbox" name="" class="controlled01" /> <input type="checkbox" name="" class="controlled01" /> <input type="checkbox" name=""
Changing an image
hello I am wanting to fade out a series of images from my web page and I have written a few lines of code to complete the task. I have, say, three images 1.jpg, 2.jpg and 3.jpg. I create a for loop to write to a div container each of the jpg's. I cannot get the functions to work properly. The images do fade but they do not update, they all stay at 3.jpg. Can anyone explain what I am doing wrong, pleasE? The code function DoImage(pageId){ var imageContent function DoImageShow(index){ imageContent
Can be be done with jquery or ajax?
Hi, I have a desparate situation. Sorry for bothering you with it. I have this: <asp:RadioButtonList ID="RadioButtonList1" runat="server" align="center" style="width:20px;height:20px;zoom:150%; white-space:nowrap;"> </asp:RadioButtonList> The values of RadioButtonList are not known until runtime. However, I did a VIEW SOURCE and was able to get their values. What we would like to do is determine the value of RadioButtonList1. It is say, for instance, 29, then show a certain textbox. Here is one
where can I get this amazing script
Dear Sir My client want (for slide show ) juist like http://www.photorestorationretouching.com/ Pls help where can I get it ? Pls help
Autoselect default value in dropdown
Struts code in jsp is <s:select name="code" id="code" headerKey="-1" headerValue="Select" list="senderList" listValue="code" listKey="id" /> which gets converted to html code as shown below <select name="code" id="code" > <option value="-1">Select</option> <option value="1">ABC1</option> <option value="2">ABC2</option> <option value="3">ABC3</option> </select> ABC1,ABC2,ABC3 are 3 different codes which can be assigned to a user.In the user info which i am getting from database, i
Apache 500 error help
Hello, Im using CGI to access paypal. It's connecting, returning successful paypal response. But, Im getting an http 500 error. The error log says: [Fri Mar 14 99:99:99:99 2014] [error] [client 88.88.88.88] ZSRV_MSG0108: Header from script is not valid. Bad header is Key Manager Factory: Im using an ajax call to a java program within my domain that is sending a request to paypal, getting a successful response but returning an apache 500 error. The program works because I can run it from a command
How do I redirect all links in an RSS feed to "click" a button on each page??
I have a job board feed and instead of the page redirecting to the job detail screen, i want it to "click" the Apply button and auto redirect the person applying to the job application. The page the RSS feed links to is made up of Javascript and I do not host the job board, my software company does. How can this be done?? If i need something from them, what? I am VERY new to javascript, and I'm willing to learn, I'm using wordpress for my website, which is where I would like to display the RSS feed.
How to toggle jQuery animate between different elements?
I have three boxes which on click animates to left+200. But I would like the click animate to toggle so that when one box is animated, the other which was previously active gets back to default.i.e.left-0 Here is a link to JSfiddle http://jsfiddle.net/92cuF/ I thought of one way but I don't know how to go about it:/ Create an empty Array. On clicking box A add to Array and animate it. If i click on box B, remove box A from and re-animate to default i.e.left-0 and add box B to Array and animate it.
IIFE
Hi, I am new to jQuery. Can some one explain me the following code? Especially why call to function message() second time also produces 42? Thanks Soundararajan var x = 42; console.log(x); var message = ( function(x){ return function(){ console.log("x is " + x); } } )(x); message(); x = 12; console.log(x); message(); //*********************************** 42 x is 42 12 x is 42
what is difference between .next().index() and .next.index() ?
pls see this fiddle http://jsfiddle.net/jakecigar/SS3U2/2/
dynamically set a sprite background-position in table cells
Hello, I'm trying to dynamically set the "flags sprite" background-position: for each country based on their "id". I've tried a bunch of different statements like if/else, while loop, etc. with no luck. The code marked // ISSUE is where I am now. Thank you, t6s //capture json data and render table rows and data $(document).ready(function(){ $.getJSON( "https://s3.amazonaws.com/reuters.sochi.medals/medals.json", function( data ) { $.each(data, function (i, val) { var sort_gold = data.sort(function(a,b){return
Finally a way to track/debug jQuery events in most browsers.
There is a new project that provides a way to track triggering of events and event handlers. https://github.com/intervalia/triggerTracker Use triggerTracker to see what is being triggered and what function is handling the event.
Next Page