I want to get a div that contains 'xxx' in its innerHTML.
I could achieve that with the following code :
$("div:contains('xxx')")
Unfortunately, I can't use this because another plugin already provided me the div.
Can I do something like this?!
element.contains('xxx')
I know I could use filter, but I want to keep it simple.
Can these pseudo-selectors be used as a property with the dot notation?
For example, if I want the last element in the selectors I could use this:
$("div:last")
Is there something like this below?
$("div").last()
I know I could use the code below but I want to keep it simple:
$("div").eq($("div").length-1)
Any idea how these pseudo-selectors can be used using the dot notation (as properties of the selected elements)?
But I cant use this cause another plugin already provided me the "div"can you explain what you mean by this? If the element's in the DOM then you can select it however you like.