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 8014019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:48:28+00:00 2026-06-04T19:48:28+00:00

I have been using GQuery for a while now. I recently came across some

  • 0

I have been using GQuery for a while now.
I recently came across some unexpected behaviour.

I have 2 different scenarios:

a) I want to select an element say

<a href="http://example.com?p=site:helloworld.com">Link</a>

I used

GQuery.$("a[href*=site:helloworld.com]") 

This doesn’t seem to work.

b) The other thing I wish to select is

<h1 data-title="SampleTitle">Title</h1>

I need to extract the value of data-title. I used the following:

GQuery.$("h1").attr("data-title");

Now, this doesn’t return an error but it doesn’t return the value either. It just returns a blank String. This doesn’t have anything to do with the ‘-‘, is it?

What am I doing wrong here?

  • 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-04T19:48:31+00:00Added an answer on June 4, 2026 at 7:48 pm

    a) I did a quick test, and the selector works fine! (But you have to quote the value as mentioned in another answer: GQuery.$("a[href*=\"site:helloworld.com\"]"))

    Note: The “*=” selector is defined in CSS 3. Gwtquery usually only supports CSS 2 at the moment, see http://code.google.com/p/gwtquery/wiki/CssGuide#CSS_scope

    b) GQuery.$("h1").attr("data-title"); works for me: It returns the full attribute string value of the first “h1” element in the document

    I’m using gwtquery 1.1.0 + GWT 2.4.0. If possible, try to upgrade to these (or later) versions.

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

Sidebar

Related Questions

I have been using json.NET successfully in projects for some time now without any
I have been using UNIX for years and the dcop command only recently came
I have been using form inheritance for a while now but without doing much
I have been using the python logging module for quite some time now, but
I have been using C# for a while now, and going back to C++
I have been using Ruby for a while now and I find, for bigger
I have been using IoC for a little while now and I am curious
I have been using ajax loaded data for a while now, but I am
I have been using the jquery appear plugin for some time now, but it
I have been using ASIHTTPRequest to fetch the data and i want to cancel

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.