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

  • SEARCH
  • Home
  • 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 8380359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:26:17+00:00 2026-06-09T16:26:17+00:00

I will update the title of this question after I fully understand what I

  • 0

I will update the title of this question after I fully understand what I am asking

I am using the vimeo api to display an array of videos using JSON and uses the tags as classes. This is working fine.

However at the end of the script I want to hide any elements that don’t match the query in the url.

var query = location.href.split('/#/').pop().split('/').join(" ");

I grab the query from the url (http://website.com/link/to/page/#/tag/tag/tag/tag = “tag tag tag tag”) then check it against the classes of each result item.

// Find Parent & checks for query classes
var thisTile = tile.parent().parent(),
    matchesClass = thisTile.hasClass(query);

// If does hot have query as class then hides
if (matchesClass === false) {
    $(this).hide();
}

NOTE: Everything works except the part where it is supposed to hide the result item if it doesn’t have the query classes.

JSFiddle: http://jsfiddle.net/JamesKyle/Rt4pt/

Test Query: http://jsfiddle.net/JamesKyle/Rt4pt/show/#/basketball

  • 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-06-09T16:26:19+00:00Added an answer on June 9, 2026 at 4:26 pm

    this is an Javascript Object (from $.getJSON), not an HTML DOM Element.

    console.log($(this));
    
    Object
    accepts: Object
    async: true
    cache: false
    contentType: "application/x-www-form-urlencoded; charset=UTF-8"
    contents: Object
    converters: Object
    crossDomain: true
    dataType: "json"
    dataTypes: Array[2]
    flatOptions: Object
    global: false
    hasContent: false
    isLocal: false
    jQuery1800318833630066365_1344952134351: true
    jsonp: "callback"
    jsonpCallback: undefined
    processData: true
    responseFields: Object
    success: function (json) {
    type: "GET"
    url: "http://vimeo.com/api/v2/video/47175713.json?callback=jQuery1800318833630066365_1344952134351&_=1344952134490"
    xhr: function createStandardXHR() {
    __proto__: Object
    

    I found that by adding two debug statments: http://jsfiddle.net/Rt4pt/6/

    I am not sure what you want to hide, but try this

    $('#' + json[0].id ).hide();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry for the double post, I will update this question if I can't get
Update: this question, including the title, was rephrased, see history for details I know
The following script will update the database, but it won't display the correct page
(Followup to this question ) After surviving the first wave of incoming shipments (9
NOTE: I am not exactly sure how to title or tag this question, so
The title basically says it all. I'm aware this can't be done using traditional
The original question: The title of this question might be a bit clumsily phrased,
I couldn't find a good title for the question, this is what I'm trying
Update : I really botched the original question. My original title was Why do
I wasn't sure how to title this and after a lot of research I'm

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.