Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6330001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:47:02+00:00 2026-05-24T17:47:02+00:00

So this is my code: $(document).jkey(‘left’,function(){ alert(Left key pressed); $.galleryUtility.slideRight }); This function is

  • 0

So this is my code:

$(document).jkey('left',function(){
    alert("Left key pressed");
    $.galleryUtility.slideRight
});

This function is placed inside the galleryUtility object. The goal is to call both the alert and the slideRight function when the left key is pressed.

So far when I press the left key it calls the alert but not the slideRight function. I’m assuming this is because the slideRight is an internal function of the galleryUtitity object and $(document) is outside the scope of the object?

So how can I call slideRight from that function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:47:02+00:00Added an answer on May 24, 2026 at 5:47 pm

    alert will block all other code from running until the user interacts with the alert.

    You need to switch the two lines to have your slideRight occur as you expect. An example showing alert blocking other JavaScript: http://jsfiddle.net/Akkuma/r8bYp/

    Additionally, you aren’t executing slideRight, which you need to do with $.galleryUtility.slideRight(). As a word of caution you aren’t following the jQuery paradigm when it comes to plugins, which is using a string to execute a method of the plugin ie. $.galleryUtility('slideRight'). In fact, I’m not sure why you have galleryUtility living off of $ at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

take a look at this code: $(document).ready(function() { document.getElementById(sliderId).onmousedown = sliderMouseDown; }); function sliderMouseDown()
On document ready I run this code: jQuery(document).ready(function(){ jQuery('#button').click(function() { jQuery('#contact_form').load(/Users/mge/Downloads/jquery-ajax-1/readme.txt); return false; });
I am using this code to sum values from multiple radio buttons : $(document).ready(function(){
So i got this snippet of code: $(document).ready(function () { var replacementDoneIn = $(body).html();
I have this code in jQuery.. $(document).ready(function(){ var fieldCounter = 0; ... I have
So I have this code: $(document).ready(function() { $(document).keypress(function(e) { switch(e.which) { // user presses
I have a problem on this code $(document).ready(function(){ $('.nm_close').click(function(){ $('.map_pops').css('display','none'); }); }); What I
I have made a flashLike button with jquery via this code: $(document).ready(function() { $('#navigation
I am implementing a slide dropdown and i am using this code $(document).ready(function(){ $('.drop').click(function(){
So, I've got this code: $(document).ready(function(){ $('form').attr('autocomplete', 'off'); }); It works great for all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.