How can I pass the $this (the self keyword) to a function in Jquery
$(document).ready(function()
{
$('.nav a').click(function() {
var direction = $(this).attr("name");
submit_form($(this))
});
function submit_form(this)
{
// do some stuff with 'this'
...
Hello guys,
I was hoping to get some ideas as how I can get a number of posts that have been posted on our blog BUT within a certain date range. I know how to get total number but need this extra functionality.
This is what I have for getting total number of posts:
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE po...
I've got a function that appends a div to an element on click. The function gets the text of the clicked element and assigns it to a variable called 'name'. That variable is then used as the div id of the appended element. I need to see if a div id with 'name' already exists before I append the element but I don't know how to find thi...
How do I diagnose web page performance problems if none of my JavaScript events seem to be the cause?
I have a web application using jqGrid. Clicking on the grid causes a 2-3 second freeze before anything happens (including any click events being hit). Clicking anywhere else on the page is fine (instant response). Removing rows red...
How would I use the keyfilter plugin and allow everything except < and >
http://code.google.com/p/jquery-keyfilter/
...
let's assume there is a site http:/ /testsite.com, with some filds and submit button.
Is there a way, to write a javascript script, which will fill all filds with values i want, and make submit operation automaticaly?
Is it possible, maybe there is some documentation about it?
Thanks
UPDATE
i don't have access to the script of site,...
I have a box with a link in it, and I have an event handler on the link that makes it create a jQuery dialog from the box when clicked. This part works fine. However, when I close the dialog, I want to restore the original box. It looked to me like .dialog("destroy") ought to do just that, since it's described as "returning the element t...
could any body tell how to use Jquery calendar date time picker.
...
how do i implement paging on xml data which is being called through php. i've been trying various jquery pagination on the xml file with no luck.
html/php code reading the xml data:
<div id="display">
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
$xmldoc = new DOMDocument();
...
Hello all! I'm trying to add a blank space in the following.
$('.post_name'+post_id+'').hide();
So it will render something similar to
post_name 8
I tried adding '' and " " but they don;t work. Can someone please help me?
...
I have created user control for menu bar and loading in Master page. User control has Link buttons. Now I want create drop down menu for one of Link buttons. I dont know, how to do that? Is there any other control that supports?
<asp:LinkButton ID="btnAttributeProcessing" CausesValidation="False" ForeColor="White" runat="server">Data ...
Hi, so I have this jQuery script below that works. But since I'm just learning jQuery, I'd like to take advantage of this working code and make it more terse.
Basically it removes a class which holds a background image, then makes a div visible which is a link to an area of the site. It seems overly repetitive to me. Thanks for the h...
Hello,
I have used in my site jScrollPane jquery plugin.
It is normally work in all browsers except Chrome.
Take a look here: http://evarivas.com/bio
In my Chrome I have no problems. Scroll works normally. On another computers sometimes works sometimes doesn't. After refresh works, or doesn't work...
What is this? Very strange...
...
Chrome (and IE when browsing local files) gives an initial value for the clientHeight of a textarea element that is incorrect. How do I get IE and Chrome to give the correct values? (Problem demo'ed here)
I am setting the position and size of the textarea via CSS fixed/absolute positioning. Then I am checking the value of clientHeight v...
I have a button that will add show a form on the page. how can I move the focus to the first field of the form when that button is clicked?
simple example:
HTML:
<form style="display:none;" id="newForm">
<input type="text" id="firstField">
</form>
<input type="button" id="showForm" value="add new">
jQuery:
$("#showForm").click(...
Hello everyone, I am unfortunately having some more problems with JQuery of late. I am working on a project in which I need to have an AJAX application working in all major browsers, including IE6 and IE7. I have created a click event for a button of the class "update" and "delete" in which an ajax request will be sent to the server. Unf...
I have an odd problem with IE8. I am trying to get a reference to a frame (same domain) object. The frame resides inside an iframe. The iframe resides deep inside multi level div's. The whole html is an output from an ASP.NET server control. jQuery code to get the reference is jQuery(top.window.frames['the_iFrame'][1].document).content...
Hello,
I'm trying to understand JSON, callbacks, etc within JS. From the altered example below, you'll see that I'm in a function callback from $.getJSON. Then, I jump into getSomething() and expect it to alter my result variable. It alters it within the scope of the function, but not when I jump out of that function.
You'll see f...
Beginner here trying to figure out best way to structure some JSON and output the below nested <ul>
Each of the bolded items below are the values in the JSON. How might I structure the JSON and then how to build the DOM structure with jQuery? Any help greatly appreciated.
<ul>
<li>Topic 1
<ul>
<li id="foo_item1a...
This is broken, reposting as an answer
...