simple get button
Hi, As you may have guessed, I am new to jquery. I am having trouble linking a button to a get request (I do not want the page to load, rather hit a URI via api to trigger an event). I've placed a button in a HTML template as such: <input type="button" id="button" value="Click me to do stuff" onclick="doStuff()" /> <script language="javascript" type="text/javascript"> $('.button').click(function('doStuff''){ $("#result") .html(ajax_load) .load(loadUrl,
Queston on .innerHeight()
Could someone please explain the conflicting results that I have been getting with the JQuery function .innerHeight. Documentation states "Gets the inner height (excluding the border and including the padding) for the first matched element" That being said why does this code do the following display the .innerheight as 96? Shouldn't it be 100 -2 = 98 + 5 = 103! <html> <head> <title>Testing InnerHeight</title> <script type="text/javascript" src="../jquery-1.8.3.js"></script> <style type="text/css">
Order of Jquery ajax events
Is there in order to the jQuery Ajax events? Below is a spinet of code using Ajax to retrieve data. If the Ajax op is "complete", but not "success" I want the background will be set yellow and if the Ajax op is "complete" and "success" background will be set to green. The background is always set to yellow. However, if the code that sets the background to yellow is commented out then the background color is green. It appears as though that "complete" status always executes after "success". $.ajax({
test if "a" tag inside "h3" tag
Im trying to test if "a" tag exist in "h3" tag but it is not working $(this) is set to = "h3" if($(this).children("a")==true){ please comment
Confused
hello, i am using bluethrust clan scripts v3 and am tryng to add dialog boxes to the site to help new members and staff. i am looking at the page http://jqueryui.com/dialog/#animated and copied <script> // increase the default animation speed to exaggerate the effect $.fx.speeds._default = 1000; $(function() { $( "#dialog" ).dialog({ autoOpen: false, show: "blind", hide: "explode" }); $( "#opener" ).click(function() { $( "#dialog" ).dialog( "open" ); return false; }); }); </script> </head> <div id="dialog"
jquery menu does not collapse
The problem that I have is that in the test code that follows question function $("#loadtest") does not collapse the menu. "newpage.htm" loads fine, but the menu1 stays expanded, with two menu items visible. First I tried .menu("collapse"), but it did not work either. Help is highly appreciated, thanks. <script type="text/javascript"> $(document).ready(function () { $("#tabs").tabs({ active: 1 }); $("#menu1").menu(); $("#menu2").menu(); $("#loadtest").click(function
Why is jquery "not defined"?
I have already tried to get going with two other tutorials, this is my third attempt. I have downloaded the developer version of jquery-1.9.0. It`s in a folder on the desktop along with my several attempts to get going This is my latest effort... <!doctype html> <html> <head> <meta charset="utf-8"> <title>Demo</title> </head> <body> <a href="http://jquery.com/">jQuery</a> <script src="jquery.js"></script> <script> var foo = "bar"; $( document ).ready(function()
Detaching elements and restoring them later
Hi. As you can see on this html. I have a div with id "page", and elements inside it. I´d like to detach these elements from div id "page", and restore them, in a click of a button. Is that possible? Thanks. Jquery Test Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras varius pulvinar ipsum et imperdiet. Phasellus rhoncus convallis erat. Quisque ante eros, vestibulum non pellentesque eget, mattis id turpis. Fusce ac mauris neque. Etiam quis mauris lectus, nec vestibulum arcu. Cras orci
select image and preview before uploading
I have a form with an image file input and several other input controls. I want to preview the image in an image tag before actually uploading all of that to the database and the image to a directory in the server.. <link href="css/style.css" rel="stylesheet" type="text/css"> <div id="form" > <form method="post" enctype="multipart/form-data"> <table border="0px"> <tr> <td rowspan="10"><img id="poster" src="images/noposter.png" alt="[POSTER]"></td> <td colspan="5"><br></td> </tr> <tr> <td colspan="5"><br></td>
Creating a selectable populated form list
Hey jquery masters! I'm relatively new to jquery and a colleague of mine suggested I ask this question here. What I'm wondering is if I can use jquery to populate a select-able listing that a user can then choose from for a HTML form. My awesome overlords have decreed that I can only use HTML/CSS/JS for the site coding. I'm building a configurations portal website, and want to be able to allow for the user to choose from a list of users who have been locked out, and take those choices and submit
Flyout menu problem: seem to be target related
I'm fairly new to jQuery and and having problems getting a flyout menu to show "slowly: (400ms). I think the problem is the way I'm targeting the element, but I'm not sure. Here is the relevant page and the menu item is "Audition songs" in the "For cast and Crew" box/menu. The basic css seems to be working fine as the menu displays on hover. (If it matters, this is a custom page in a Wordpress site.) http://youthconnectionwilmette.org/seussical-info/ I put an alert in the document.ready function
test for background color
Below is a spinet of code that is suppose to change the background color if it is NOT red, but isn't working. Please comment! if( $("input#translate").css("background-color")!=rgb(255,0,0)){ $("input#translate").css("background-color","green"); }
change class attribute without ref to an element?
Is there to a way to change an attribute value of a class without an element reference? .someClass{ someAtributeValue} is there a way to change the attribute value of .someClass from: someAttributeValue to: thisAttributeValue with jquery? Im not sure I am asking this question properly. Please Comment.
Pop under doesn't work in IE
Hey guys. I am a noob, but almost managed to get this work but it doesn't work in IE. Let me explain what I mean. I want to create a pop under that willl be triggered by clicking the video player. 1. I downloaded pop under js files 2. Created a test div (works both in FF and IE) 3. Inserted a video player in this div (Now works only in FF) Here's the link to my test page: http://www.richdadinvesting.com/test/pop/ How can I get this work in IE? Thanks.
apply class distinction to two flip buttons
It must be very simple, but I somehow can't progress with it. Pls help. I want to make the rightmost switcher slightly wider <select name="flip-1" id="flip-1" data-role="slider" > <option value="off">convex</option> <option value="on"> concave</option> </select> <select name="flip-2" id="flip-2" data-role="slider" class="bigga"> <option value="off">parallel</option> <option value="on"> perpendicular</option> </select>
image protection
I've written my website with Jquery and everything's working fine. My problem is that my images are stolen regularly. I'm an artist and don't really mind that people are reposting my work, but not one of the thefts credit the original source, namely ME. Aside from watermarks, which I will add to the images, can anyone suggest useful mechanisms for image protection? I believe that Flickr uses a transparent overlay to prevent dragging and dropping. Is there a Jquery item that adds this option to an
Tutorial: css with jquery explained plainly
is there a tutorial for using css combined with jquery?
how to print div content?
I am trying to use jQuery to print DIV content (Print on a printer) here is what i am doing but it is not working <script> $("#print").click(function() { $("#fullContract").printElement(); }); </script>
Submit form plus
Hi, here's what I want to do: 1. When button "Submit" is clicked jquery gathers some information from various divs and writes them in a variable 2. jquery gathers more information from a form (checkboxes and "text"-fiels) 3. jquery submits everything to a php-script. Point 1 is no problem, but I don't know how to get the stuff users type in or check in a form through jquery. Also, how do I tell jquery to submit all this stuff in the way a form-field submit-type button would? Hope I made myself clear
How to open a popup page with in a condition statment?
Hi I want to create a popup page with 800px width and no toolbar or status bar but I want the right scrolbar to be automatic. So I have a php code like do <?php If($sql){ echo 'bingo'; // popup page } ?> How can I do that with jquery?
writing html in a div affects whole document
Hi guys, I have a function that takes a user html input and writes into a div. The html is written as a whole other html document. The user will write the "<html>" , "<styles>, and <script> tags and the whole content in a and textarea, it then get's outputted as html in a div. Everything works fine, but when the user applies a body color style rule the color gets applied not only to the div but also the whole of the page. Also the body background color doesn't seem to work, my guess is that it
http://www.complitly.com/ plugin issue
Hey How to disallow plugin to act on your webpage? I made a website and I dont want thie plugin ( http://www.complitly.com/ ) to suggest users. I turned off the autocomplete but still the issue is there. Please help
Make horizontal sliding menu 'smarter'
Hi, im working on a menu which is a 'bar' sliding from the left. The menu have 3 levels. I found myself within lack of knowledge when it comes to making the menu smarter. I could continue doing what i am, but then the function would contain a unnecessary amount of lines ( I think!?) and be clumsy!?. , is it posible write a smart function instead of making one function for each 'link'. I made a jsFiddle. Press the yellow bar. then 'food' then 'om'. Link to jsfiddle All the best
Positioning Elements. [SOLVED]
Learning jquery and created a menu: http://gmjones.org/jqmenu/test.html But as you can see, the drop-downs are moving behind the text below. How do I place the drop-down menu on top of the text? I've experimented with z-index but no luck. Hope someone can help Thanks.
Div show and fixed menu
Hi guys, I hope you're good ! I have a little question about how to make something similar like this website:http://www.brianhoffdesign.com/index.html I searched everywhere but I can't find the solution. I know it's not hard to do. Basically it's a one page. We show only a div parts then we hide this div and we scroll to the other div, then we fix the menu on top. But I tried to do that without working! Anyone may help? Thanks !
Question on Statement Chaining
Could someone please help: I am taking the Lynda.com class 'JQuery - Essential Training' and I'm having trouble getting one of the exercises to work from chp 2. I am using the JQuery library 'jquery-1.8.3.js' and my file structur is as follows. C:\JQuery\Excercises\images\small_pdf_icon.gif and C:\JQuery\Excercises\Sample.htm Full code of Sample.htm = http://pastebin.com/WViQRET5 The line I'm having trouble getting to work is: $("li a[href$=.pdf]").after("<img src='images/small_pdf_icon.gif' align='absbottom' />");
jQuery VSDoc not working
I have a master page where we reference jquery 1.8, in the following way <script src='<% =ResolveUrl("~/JavaScript/jquery-1.8.0.js")%>' type="text/javascript"></script> <script type="text/javascript"> var baseUrl = '<%= ResolveUrl("~/") %>'; function ResolveUrl(url) { if (url.indexOf("~/") == 0) { url = baseUrl + url.substring(2); } return url; } </script> the JQuery is working fine. After downloading jQuery VSDoc
Cannot append to unordered list in select's change function??
$("#version_select").change( function() { $('#listval').append('<li>'+ $(this).val() +'</li>'); }); Very simply: I have an unordered list on my page with the id of "listval" and a dropdown menu with the id of "version_select". I know that I am getting the value in the change function because I can alert it out and see it using " alert $(this).val(); ", but I can not append it to my list. Why not? How? Thanks, Mark
newbie getting onchange in an ajax to fire from a SELECT statement
I have a web page with multiple dropdown lists. The dropdown list ( in real example will be coming from database) in this example comes from ajax. How can I get the the ONCHANGE to fire from a select statement from a drop down list? And How do I get the value of what was selected? I have spent hours on this.I want the onchange to fire checkCity and get value in checkCity function. <% ''' testGetCity.asp strcc=request.querystring("cc") If Len(trim(strcc))=0 THEN strcc="1" If strcc="1" THEN
Multiple slide out menu
Hi, I am new to jquery, so already excuse me for asking basic questions. I did search the forum but do not really find what I am looking for, although I am sure it must exists somewhere already. I would like to make a menu with large buttons horizontally positioned next to each other. When one of the buttons in clicked that button should color (as being active) and a slide out should appear undernead the menu with a more detailed submenu and some images. The slide should remain open until another
jQueryUI databinding
The ASP.NET standard toolbox server controls have convenient features, data binding for one. Can I get those same convenience features with controls in the jQueryUI?
How to highlight a element when clicked.
How can I get a highlight effect on the element that is clicked to show the user selected this entity? I was thinking a right click effect. So when you right click an element 2 things will happen highlight the element and display a custom context menu. I already have the custom context menu and it works but I currently have it setup that when you right click an element it will generate a new div right over the element in question and will use the same width and height and location. So this div will
Dead link to MDN reserved words resource
Current link in guide points to ' https://developer.mozilla.org/en/JavaScript/Reference/Reserved_Words, ' (MDN JavaScript Reference) Should point to ' https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Reserved_Words '. Looks like an extra comma got slipped in at the end. Just an FYI.
It doesn't work on google chrome but works fine on IE
The modal dialog works fine when I click on the gridview row on windows explorer, but it doesn't function at all when I try it on Chrome. <head id="Head1" runat="server"> <title>test</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.8.3.js"></script> <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script> <style type="text/css"> .ui-widget { font-size:10%; }
why these outcommented selection methods dont work?
these outcommented selection methods dont work, i cant see why it was about just experimenting <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"> </script> <script> $(document).ready(function(){ $("button").click(function(){ $("#div1").fadeIn(); $("#div2").fadeIn("slow"); $("#div3").fadeIn(3000); $("#div3").css('background-color','blue'); }); }); $(document).ready(function(){ $("#div1").click(function(){ $('.effekt
using a value from where the mouse pointer is
hi, i have more rows with different users and i want to get the user id from where the mouse pointer is and land it in the image source of mini_profile div this stupid code of mine looks like this php file echo "<span class='hover'>".$row1['name']."<span class='id_user' style='transparency:1%;'>".$row1['id_user']."</span></span>"; echo "<span class='hover'>".$row2['name']."<span class='id_user' style='transparency:1%;'>".$row2['id_user']."</span></span>"; <div id="mini_profile" style="display:none;position:absolute"><img
Using Theme Roller CSS in ASP.NET web app
I am new to jQuery and Ajax. I have what is probably a dumb question. Are there any shortcuts or tips for taking a theme from the Theme Roller and integrating it into a Visual Studio ASP.NET web app project? The default web app project already has a style sheet but I would like to apply the style from the Theme Roller into the web app. I suspect I'll have to do a tedious examination of the markup in the Site.Master and edit its style tags. Is that what I'll have to do? Or, is there a better way to
Increase PageRank with this jQuery plugin
Hello all, Increase PageRank with text-links with the above plugin you can define anchor links differently, keeping PageRank on the site and thus increasing site PageRank. What do you think?
Select / find all divs with custom attribute
Hi Guys, Can anybody help, I am about to cry.. I have a page with two div elements who has custom attribute "validated" = "false" How to get them? I was looking for a solution, trying few Google suggestions, no success so far. Thanks in advance!
animate to center
My goal is to have two squares to emerge from the left and right of the screen and meet in the center. And stay there.The squares need to cover the whole screen. Imagine standing in front of an elevator, and having both doors close in front of you. Thats what Im trying to do. Can someone please help? when i animate the squares to move right/left by _px, if you resize the screen, a gap appears.
Next Page