Dynamic Plugin Extensions
I'm looking for techniques to allow a jquery plugin or jquery-based javascript library to automatically and dynamically add extensions to itself based on the current environment it finds itself within. Basically, I want to be able to reuse certain useful functions from other plugins if other plugins are loaded ...
I have a web page that has content which extends past the right edge of the browser window. I set overflow-x: hidden on <body> to turn off the bottom scrollbar, but I can still scroll horizontally with the trackpad, which is not what I want.
Is there any way to prevent the browser from scrolling horizontally?
As a side note: Safari 4.0...
Had a nice PHP/HTML/JS prototype working on my personal Linode, then tried to throw it into a work machine.
The page adds a script tag dynamically with some JavaScript. It's a bunch of Google charts that update based on different timeslices. That code looks something like this:
// jQuery $.post to send the beginning and end timestamps
...
I have a website where I have to click a submit button on a form. This gives me a link. I know the link is made up with the paramter that is passed through a hidden value. I was wondering if I could make a python script or something else that would go to the website and click some buttons returning the link that the submit button generat...
Would I want to nest one function into another?
...
Hi guys,
Currently, my code shows a loading spinner gif, returns the data and caches it. However, once the data has been cached, there is a flicker of the loading gif for a split second before the data gets loaded in. It's distracting and I'd like to get rid of it. I think I'm using the wrong method in the beforeSend function here:
$.a...
I am trying to integrate FB connect into our user profile screen. Although, I'm having an issue with FB.ApiClient.revokeAuthorization.
http://pastie.org/921942
The basic problem is that I revoke the auth at line 44 after the user clicks the disconnect button.
After that, all subsequent API calls don't have a valid session to even che...
I've done a lot of research on this but have come up empty handed. What I would like to do is invoke or create an event for the right arrow key (Key Code 39). I was planning on using an onclick event inside an tag to go to a function where this event could be 'fired'. Any help would be appreciated.
If anyone needs context, I have a jQu...
Hello, I'm working on a site right now that has a short picture slideshow for the homepage. I purchased a template and I am modifying it to work for this situation. On modification, the thumbnail row under the slideshow is now separated from the slideshow and the thumbs are not centered. I can't seem to understand how to get this to get ...
The following does not work:
var js_str= '<?php echo $str_from_server; ?>';
The problem is that, $str_from_server can contain any characters. If it contains single quotes or line breaks or others, the above code will break. And I do not have access to the server-side code. What's the easiest way to "escape" the contents of $str_from_s...
Hi all,
I am calling my database which contains a datetime datatype. The date looks like this:
2005-05-23 16:06:00.000
I would like to display this in a table when a user selects a certain item from a list. I call my controller action and return Json of all the times and put them in a table. The problem is the date is completely wrong...
I am implemeting a facebook application in rails using facebooker plugin, therefore it is very important to use this architecture if i want to update multiple DOM in my page.
if my code works in a regular rails application it would work in my facebook application.
i am trying to use ajax to let the user know that the comment was sent, ...
I'm using the following code to allow parallel JavaScript downloading on my website
var head = document.getElementsByTagName("head")[0];
var sTag1 = document.createElement("script");
sTag1.type = sTag1.type = "text/javascript";
sTag1.src = "http://example.com/one.js";
var sTag2 = document.createElement("script");
sTag2.type = sTag2....
I am trying to open a window from a php script. But when I click I get this error
Line: 389
Error: 'surgExpressBuildDefaultButton' is null or not an object
Line 389 code is as follow
function setupLayout(i)
{
document.body.onselectstart = function()
{
if (event.srcElement.tagName.search(/input|textarea/i)) return false;
}
setup...
Say I do
var s = $('#something');
and next I want to test if jQuery found #something, i.e. I want to test if s is empty.
I could use my trusty isempty() on it:
function isempty(o) {
for ( var i in o )
return false;
return true;
}
Or since jQuery objects are arrays, I suppose I could test s.length.
But neither see...
I am using jQuery and my js file thats calling a jquery function resides in totally different directory than jQuery is in. I need to call this function reloadPage like this from js file
reloadPage({param1:'First Parameter', param2:ID});
but it gives me an error
Line: 341
Error: Object doesn't support this property or method
Line ...
I'm having a bit of trouble with John Resig's Micro templating.
Can anyone help me with why it isn't working?
This is the template
<script type="text/html" id="row_tmpl">
test content {%=id%} {%=name%}
</script>
And the modified section of the engine
str
.replace(/[\r\t\n]/g, " ")
.split("{%").join("\t")
.replace(...
What type of graphical tool shows the shape of the data set by stacking x's above each data value on q number line?
...
Round two. First was "How do I get all supported CSS properties in WebKit?".
I'm looking for magic CSSkeywords function:
CSSkeywords('float') --> ['left', 'right', 'none']
CSSkeywords('width') --> ['auto']
CSSkeywords('background') --> [
["repeat", "repeat-x", "repeat-y", "no-repeat"],
["scroll", "fixed"],
["top", "center", "bo...
Hello,
I have an XML file ( XML file I produce ) which contains information about my parteners.
I want them to display on their website information relative to them by picking them into the XML file.
I have no idea to do that, ecxept that i need to write a 'parser' in javascript to display information. This javascript code i guess has...